summaryrefslogtreecommitdiff
path: root/bat
diff options
context:
space:
mode:
Diffstat (limited to 'bat')
-rwxr-xr-xbat6
1 files changed, 6 insertions, 0 deletions
diff --git a/bat b/bat
new file mode 100755
index 0000000..7b0e3b3
--- /dev/null
+++ b/bat
@@ -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;