aboutsummaryrefslogtreecommitdiff
path: root/screen/batinfo
diff options
context:
space:
mode:
Diffstat (limited to 'screen/batinfo')
-rwxr-xr-xscreen/batinfo13
1 files changed, 13 insertions, 0 deletions
diff --git a/screen/batinfo b/screen/batinfo
new file mode 100755
index 0000000..3366c1f
--- /dev/null
+++ b/screen/batinfo
@@ -0,0 +1,13 @@
+#!/bin/sh
+#batinfo
+stat=` acpi | tr -s , | cut -d -f4 `
+pct=` acpi | tr -s , | cut -d -f5 `
+
+color="^E{k.}"
+case $stat in
+ discharging) color="^E{kr}" ;;
+ charging) color="^E{kg}" ;;
+ *) color="^E{k.}" ;;
+esac
+
+echo "$color$pct^E{-}($color$stat^E{-})"