blob: 0f36e18314115d2daef0d70cfbf90893468622b9 (
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
if [ "$MENUCMD" = "tofi" ]
then
menucmd="tofi --width 5% --height 10% --prompt-text"
elif [ "$MENUCMD" = "dmenu" ]
then
menucmd="dmenu -g 2 -l 1 -p"
else
menucmd="fzf --prompt"
fi
while true
do
volume="$(mpc volume | awk '{print $2}' | cut -f1 -d'%')"
choice="$(echo "plus\nmin" |
$menucmd "$volume" |
sed 's/plus/+/;s/min/-/')"
test -z "$choice" && break
nb="$($menucmd "$volume$choice" < /dev/null)"
test -z "$nb" && break
mpc volume "$choice$nb"
done
|