mirror of
https://git.poridge.club/aurel1on/dwm-cute.git
synced 2024-11-09 19:40:27 +03:00
18 lines
648 B
Bash
18 lines
648 B
Bash
#!/bin/sh
|
|
# changeVolume
|
|
|
|
msgTag="volumechange"
|
|
iconPath="/usr/share/icons/Adwaita/32x32/legacy/"
|
|
|
|
volume="$(pactl get-sink-volume 0 | awk '{print $5}' )"
|
|
mute="$(pactl get-sink-mute 0 | awk '{print $2}' )"
|
|
|
|
|
|
if [[ $volume == 0 || "$mute" == "yes" ]]; then
|
|
# Show the sound muted notification
|
|
notify-send -a "changeVolume" -h string:x-dunst-stack-tag:$msgTag -i $iconPath/audio-volume-muted.png "Volume muted" --expire-time=1000
|
|
else
|
|
# Show the volume notification
|
|
notify-send -a "changeVolume" -h string:x-dunst-stack-tag:$msgTag -i $iconPath/audio-volume-high.png -h int:value:"$volume" "Volume: ${volume}" --expire-time=1000
|
|
fi
|