aboutsummaryrefslogtreecommitdiff
path: root/screen/batinfo
blob: 3366c1fc61a7143bbba67ac56e4644df4156fa77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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{-})"