Update audio scripts to use PulseAudio
This commit is contained in:
parent
edbfc037c1
commit
313068530b
@ -50,10 +50,10 @@ Pause
|
|||||||
|
|
||||||
# mute
|
# mute
|
||||||
XF86AudioMute
|
XF86AudioMute
|
||||||
amixer sset Master toggle && pkill -RTMIN+1 dwmblocks
|
pamixer -t && pkill -RTMIN+1 dwmblocks
|
||||||
# volume control
|
# volume control
|
||||||
XF86Audio{Raise,Lower}Volume
|
XF86Audio{Raise,Lower}Volume
|
||||||
amixer sset Master 5%{+,-} && pkill -RTMIN+1 dwmblocks
|
pamixer -{i,d}3 && pkill -RTMIN+1 dwmblocks
|
||||||
# songs control
|
# songs control
|
||||||
XF86Audio{Next,Prev}
|
XF86Audio{Next,Prev}
|
||||||
playerctl {next,previous} && pkill -RTMIN+2 dwmblocks
|
playerctl {next,previous} && pkill -RTMIN+2 dwmblocks
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
[ "$(amixer sget Master | awk 'NR==5 { print $6 }')" = "[off]" ] && {
|
# Actually PulseAudio
|
||||||
|
|
||||||
|
[ "$(pamixer --get-mute)" = "true" ] && {
|
||||||
echo " mut" && exit 1
|
echo " mut" && exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
level="$(pamixer --get-volume)"
|
||||||
level=$(amixer sget Master | awk -F"[][]" '/dB/ { print $2 }')
|
|
||||||
revel="${level%?}"
|
|
||||||
|
|
||||||
v1=""
|
v1=""
|
||||||
v2=""
|
v2=""
|
||||||
v3=""
|
v3=""
|
||||||
|
|
||||||
if [ "$revel" -lt 35 ]; then
|
if [ "$level" -lt 35 ]; then
|
||||||
printf "$v1 "
|
printf "$v1 "
|
||||||
elif [ "$revel" -lt 60 ]; then
|
elif [ "$level" -lt 60 ]; then
|
||||||
printf "$v2 "
|
printf "$v2 "
|
||||||
elif [ "$revel" -lt 100 ]; then
|
elif [ "$level" -lt 100 ]; then
|
||||||
printf "$v3 "
|
printf "$v3 "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$level"
|
echo "$level%"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user