blob: 542fda7c83233c81a91c9b112b5fa8c0b078a78e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/sh
case $(hostname -s) in
mother) return ;;
po-rbo) [ $(cat /sys/class/power_supply/BAT0/status) = "Charging" ] && echo -n "ﮣ " ;;
mars) [ $(apm -b) -eq 3 ] && echo -n "ﮣ " ;;
esac
case $(hostname -s) in
po-rbo) charge=$(cat /sys/class/power_supply/BAT0/capacity) ;;
mars) charge=$(apm -l) ;;
esac
case $(echo $charge / 20 | bc) in
"0") printf " ";;
"1") printf " ";;
"2") printf " ";;
"3") printf " ";;
"4") printf " ";;
"5") printf "ﮣ ";;
esac
|