summaryrefslogtreecommitdiffstats
path: root/.local/bin/status/sb-volume
blob: aefad808744424ebb2599a1ad397c1d986cf2069 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

vol="$(mixer vol | awk '{print $7}' | cut -d ':' -f1)"

if [ "$vol" -gt "70" ]; then
	icon=""
elif [ "$vol" -gt "30" ]; then
	icon=""
elif [ "$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 "$micon  $icon "