summaryrefslogtreecommitdiff
path: root/bat
diff options
context:
space:
mode:
authorTslil Clingman <hiato1@gmail.com>2015-06-17 21:59:14 +0200
committerTslil Clingman <hiato1@gmail.com>2015-06-17 21:59:14 +0200
commitaab74a4002f5154ee117bc38a2481be0ab710e1e (patch)
tree0ecbd29515e902c0e36b07f2363f2337db57cc20 /bat
parenteb393abbcd6c3913701fdb8f7919ae663cec1e04 (diff)
parent4b9bca8485bda63c9fdd90df0a4d5311c3fd7be8 (diff)
Merge branch 'master' of github.com:tslilc/scripts
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..d98974c
--- /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 | cut -d: -f 1-2;