Project

General

Profile

Actions

Feature #988

open

Add Battery status to launcher for xeon.

Added by Hammel 12 months ago. Updated 6 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

Also available in: Atom PDF