diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 12a78d1..ed5aec3 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -50,10 +50,10 @@ Pause # mute XF86AudioMute - amixer sset Master toggle && pkill -RTMIN+1 dwmblocks + pamixer -t && pkill -RTMIN+1 dwmblocks # volume control XF86Audio{Raise,Lower}Volume - amixer sset Master 5%{+,-} && pkill -RTMIN+1 dwmblocks + pamixer -{i,d}3 && pkill -RTMIN+1 dwmblocks # songs control XF86Audio{Next,Prev} playerctl {next,previous} && pkill -RTMIN+2 dwmblocks diff --git a/.local/bin/scripts/statusbar/sb-alsa b/.local/bin/scripts/statusbar/sb-alsa index ee5dcda..8153103 100755 --- a/.local/bin/scripts/statusbar/sb-alsa +++ b/.local/bin/scripts/statusbar/sb-alsa @@ -1,23 +1,23 @@ #!/bin/sh -[ "$(amixer sget Master | awk 'NR==5 { print $6 }')" = "[off]" ] && { +# Actually PulseAudio + +[ "$(pamixer --get-mute)" = "true" ] && { echo " mut" && exit 1 } - -level=$(amixer sget Master | awk -F"[][]" '/dB/ { print $2 }') -revel="${level%?}" +level="$(pamixer --get-volume)" v1="" v2="" v3="" -if [ "$revel" -lt 35 ]; then +if [ "$level" -lt 35 ]; then printf "$v1 " -elif [ "$revel" -lt 60 ]; then +elif [ "$level" -lt 60 ]; then printf "$v2 " -elif [ "$revel" -lt 100 ]; then +elif [ "$level" -lt 100 ]; then printf "$v3 " fi -echo "$level" +echo "$level%"