nixos/home/common/optional/desktop/x11/scripts/dunstify-volume-notificatio...

24 lines
560 B
Bash

mute_test=$(pamixer --get-mute)
mic_mute_test=$(pamixer --default-source --get-mute)
mute=""
if [ "$mute_test" == true ];
then
mute="(Speakers Muted)"
fi
if [ "$mic_mute_test" == true ];
then
mute="(Mic Muted)"
fi
if [ "$mute_test" == true ] && [ "$mic_mute_test" == true ];
then
mute="(Speakers Muted & Mic Muted)"
fi
volume=$(pamixer --get-volume)
msgTag="volume-notify"
dunstify -a "changeVolume" -u low -i audio-volume-high -h string:x-dunst-stack-tag:$msgTag "Volume" "${volume} ${mute}" -t 2000