summaryrefslogtreecommitdiffstats
path: root/.local/bin/status/sb-battery
blob: bad456c2cb7ff3f39b3a98e35dc17bb5b9030e1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

status=$(apm -b)

[ "$status" -eq 3 ] && exit

case $(echo $(apm -l) / 12.5 | bc) in
	"0") printf "[        ]";;
	"1") printf "[=       ]";;
	"2") printf "[==      ]";;
	"3") printf "[===     ]";;
	"4") printf "[====    ]";;
	"5") printf "[=====   ]";;
	"6") printf "[======  ]";;
	"7") printf "[======= ]";;
	"8") printf "[========]";;
esac