10 lines
416 B
Bash
10 lines
416 B
Bash
#!/bin/bash
|
|||
|
|
|
||
|
|
volume=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -Po '\d+(?=%)' | head -1)
|
||
|
|
mute=$(pactl get-sink-mute @DEFAULT_SINK@ | grep -Po '(?<=Mute: )(yes|no)')
|
||
|
|
|
||
|
|
if [ "$mute" = "yes" ]; then
|
||
|
|
notify-send -a "System" -r 9993 -i audio-volume-muted "Muted" --urgency=LOW -t 1000
|
||
|
|
else
|
||
|
|
notify-send -a "System" -r 9993 -h int:value:"$volume" -i audio-volume-high "Volume: ${volume}%" --urgency=LOW -t 1000
|
||
|
|
fi
|