From 4b66da7ff8060fffdeac1cc4cb27f3182b3f2d46 Mon Sep 17 00:00:00 2001 From: Vasil Zlatanov Date: Sun, 23 Feb 2014 16:59:47 +0100 Subject: First commit of dotfiles. --- screen/batinfo | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 screen/batinfo (limited to 'screen/batinfo') 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{-})" -- cgit v1.2.3-54-g00ecf