summaryrefslogtreecommitdiff
path: root/battery
diff options
context:
space:
mode:
Diffstat (limited to 'battery')
-rwxr-xr-xbattery6
1 files changed, 6 insertions, 0 deletions
diff --git a/battery b/battery
new file mode 100755
index 0000000..d98974c
--- /dev/null
+++ b/battery
@@ -0,0 +1,6 @@
+#!/usr/bin/env sh
+
+# Quick hack to display battery levels for the laptop
+
+str="s/ Charging, /C/;s/ Discharging, /D/;s/ Unknown,/U/"
+acpi | cut -d: -f 2- | sed "$str" | cut -d\ -f 1-2 | cut -d: -f 1-2;