summaryrefslogtreecommitdiff
path: root/bin/batt
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2023-03-05 12:46:32 +0100
committerMarc Vertes <mvertes@free.fr>2023-03-05 12:46:32 +0100
commit6dc16e1476e55ea34b32bee558d429d7d11d0e9e (patch)
treeb13dfeb695c9365c1a67e303b524086cf7f65e52 /bin/batt
parent320cc91398a17f57da0296ffc64ddcbb64921df1 (diff)
update
Diffstat (limited to 'bin/batt')
-rwxr-xr-xbin/batt9
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/batt b/bin/batt
index a5eb22f..73273d5 100755
--- a/bin/batt
+++ b/bin/batt
@@ -1,4 +1,9 @@
#!/bin/sh
# print battery status
-. /sys/class/power_supply/BAT0/uevent &&
-echo "$POWER_SUPPLY_TYPE $POWER_SUPPLY_STATUS $POWER_SUPPLY_CAPACITY%"
+. /sys/class/power_supply/BAT0/uevent
+case $POWER_SUPPLY_STATUS in
+ Discharging) s='↧' ;;
+ Full) s='¤' ;;
+ Charging) s='↥' ;;
+esac
+echo "power $s $POWER_SUPPLY_CAPACITY%"