Added notifications for volume change

Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
Louis Vallat 2022-01-16 18:14:42 +01:00
parent fbb522ce5e
commit f19fa59f03
No known key found for this signature in database
GPG Key ID: 0C87282F76E61283

View File

@ -51,16 +51,20 @@ super + {Left,Down,Up,Right}
bspc node -v {-20 0,0 20,0 -20,20 0}
XF86AudioMute
amixer set Master toggle
pactl set-sink-mute @DEFAULT_SINK@ toggle && \
dunstify -h string:x-dunst-stack-tag:sink-mute "Sink muted" (pactl get-sink-mute @DEFAULT_SINK@ | cut -d ' ' -f 2)
XF86AudioRaiseVolume
amixer set Master 2%+
pactl set-sink-volume @DEFAULT_SINK@ +2% && \
dunstify -h string:x-dunst-stack-tag:sink-volume "Sink volume" (pactl get-sink-volume @DEFAULT_SINK@ | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' | head -n 1)
XF86AudioLowerVolume
amixer set Master 2%-
pactl set-sink-volume @DEFAULT_SINK@ -2% && \
dunstify -h string:x-dunst-stack-tag:sink-volume "Sink volume" (pactl get-sink-volume @DEFAULT_SINK@ | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' | head -n 1)
XF86AudioMicMute
amixer set Capture toggle
pactl set-source-mute @DEFAULT_SOURCE@ toggle && \
dunstify -h string:x-dunst-stack-tag:source-mute "Source muted" (pactl get-source-mute @DEFAULT_SOURCE@ | cut -d ' ' -f 2)
XF86MonBrightnessDown
echo (math (cat /sys/class/backlight/amdgpu_bl0/brightness) - 5) > /sys/class/backlight/amdgpu_bl0/brightness