summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2023-02-17 16:16:56 +0100
committerMarc Vertes <mvertes@free.fr>2023-02-17 16:16:56 +0100
commitc8fb9352ac79d2ccf3dcdb352840b60e4dcc548a (patch)
tree6ad28f31e5d8673ab3a6180e46ff2cf87a28e767 /bin
parentfe0415e0b2ec50c866c5d2f297bce112abf6d690 (diff)
add batt to print battery status
Diffstat (limited to 'bin')
-rwxr-xr-xbin/batt4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/batt b/bin/batt
new file mode 100755
index 0000000..a5eb22f
--- /dev/null
+++ b/bin/batt
@@ -0,0 +1,4 @@
+#!/bin/sh
+# print battery status
+. /sys/class/power_supply/BAT0/uevent &&
+echo "$POWER_SUPPLY_TYPE $POWER_SUPPLY_STATUS $POWER_SUPPLY_CAPACITY%"