summaryrefslogtreecommitdiff
path: root/battery
diff options
context:
space:
mode:
authorTslil Clingman <tslil.clingman@gmail.com>2015-12-16 23:52:39 -0500
committerTslil Clingman <tslil.clingman@gmail.com>2015-12-16 23:52:39 -0500
commit9ada1cffc8a3aff64c9cfe2ec42ad4b3c02bc9cd (patch)
treea150e80ea05be6f2410fb1fee700670a8187de85 /battery
parent42ee791b2f58cc8fa78b73d058ecba0f0b091798 (diff)
runas sends arguments on
- lock now uses ssh-agent because who knows how to get gpg-agent working properly anymore - there was an extra line being printed in the wls prompt - alsa now has a binary called bat. yay.
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;