blob: 402431d6a9faad1b4287709e37e0204592a51645 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/bin/sh
vol="$(mixer vol | awk '{print $7}' | cut -d ':' -f1)"
if [ "$vol" -gt "0" ]; then
icon=""
else
icon="婢"
fi
mic="$(mixer rec | awk '{print $7}' | cut -d ':' -f1)"
if [ "$mic" -gt "0" ]; then
micon=""
else
micon=""
fi
echo -n "$micon $icon "
case $(echo $vol / 12.5 | bc) in
"0") printf "[ ]";;
"1") printf "[= ]";;
"2") printf "[== ]";;
"3") printf "[=== ]";;
"4") printf "[==== ]";;
"5") printf "[===== ]";;
"6") printf "[====== ]";;
"7") printf "[======= ]";;
"8") printf "[========]";;
esac
|