Project

General

Profile

Actions

Feature #988

open

Add Battery status to launcher for xeon.

Added by Hammel 11 months ago. Updated 5 months ago.

Status:
In Progress
Priority:
Immediate
Assignee:
Category:
-
Target version:
Start date:
19 May 2023
Due date:
% Done:

10%

Estimated time:
Severity:
05 - Very Low

Description

This is pretty simple and should probably just be part of launcher (or have launcher with an embedded status bar of other apps?).

To get battery power available status just do the following.

# cat /sys/class/power_supply/rk818-battery/capacity 
67

In this case the battery is 67% full. Pretty easy to integrate into an app.

  1. Battery status RM #988
    1. see https://github.com/JasonG-FR/PineBattery/blob/main/PineBattery.py for example in python.
      1. get_voltage_max_path - identifies PinePhone models
      2. This would be easy to convert to a C app.
      3. cat /sys/class/power_supply/rk818-battery/capacity
    2. Kernel lookups
      1. rk818-bat
      2. simple-batteryroot (compatible string under /sys/firmware/devicetree/base/battery)
      3. /sys/class/power_supply/rk818-battery/
      4. see https://www.howtogeek.com/810971/how-to-check-a-linux-laptops-battery-from-the-command-line/
Actions #1

Updated by Hammel 5 months ago

  • Description updated (diff)
Actions #2

Updated by Hammel 5 months ago

  • Target version changed from Xeon 1.0 - Asimov to 3.0 - Corrino
Actions #3

Updated by Hammel 5 months ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

Added /usr/bin/showbattery.sh as a temporary solution for the command line.

Actions #4

Updated by Hammel 5 months ago

  • Project changed from Xeon to launcher
  • Subject changed from Add Battery app to Add Battery status to launcher for xeon.

After thinking this over I think I'll just implement this in the launcher.

Actions

Also available in: Atom PDF