From f19fa59f033561a4d5cdbec7f201549dd8acb0f0 Mon Sep 17 00:00:00 2001 From: Louis Vallat Date: Sun, 16 Jan 2022 18:14:42 +0100 Subject: [PATCH] Added notifications for volume change Signed-off-by: Louis Vallat --- .config/sxhkd/sxhkdrc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 31c7d8b..2e48d81 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -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