joonas-fi / joonas-sys

My personal system installation (Ubuntu + programs & conf I use) as code.
https://joonas.fi/
Apache License 2.0
8 stars 1 forks source link

Show connected batteries like wireless mouse battery #24

Open joonas-fi opened 1 year ago

joonas-fi commented 1 year ago

Use case: charge mouse before the battery runs out

Maybe show any warnings in top bar

/sys/class/hwmon/hwmon4/device/uevent:

POWER_SUPPLY_NAME=hidpp_battery_0
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_SCOPE=Device
POWER_SUPPLY_MODEL_NAME=MX Ergo Multi-Device Trackball
POWER_SUPPLY_MANUFACTURER=Logitech
POWER_SUPPLY_SERIAL_NUMBER=406f-80-58-20-27
POWER_SUPPLY_CAPACITY_LEVEL=Full
joonas-fi commented 1 year ago
        Valid values:
                  "Unknown", "Critical", "Low", "Normal", "High",
                  "Full"

Source: https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-power

joonas-fi commented 1 year ago

Maybe supported directly by i3status?

https://i3wm.org/docs/i3status.html#_battery

joonas-fi commented 1 year ago

Maybe supported directly by i3status?

Yes, but it doesn't seem to support not displaying the element when status is over a threshold?

joonas-fi commented 1 year ago

Related (or duplicate of): #15