adds multi device support for volume keybinds

This commit is contained in:
2025-06-18 14:02:41 +02:00
parent fbf475fa82
commit 07f6759d0d
2 changed files with 83 additions and 3 deletions

View File

@ -28,9 +28,9 @@ bindd = $mainMod, G, Remove gaps between window, exec, hyprctl --batch "keyword
# ======= Volume Control =======
bindel = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5% && pactl get-sink-volume @DEFAULT_SINK@ | grep -oP '\d+(?=%)' | awk '{if($1>100) system("pactl set-sink-volume @DEFAULT_SINK@ 100%")}' # Raise Volume
bindel = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5% # Lower Volume
bindel = , XF86AudioMute, exec, amixer sset Master toggle | sed -En '/\[on\]/ s/.*\[([0-9]+)%\].*/\1/ p; /\[off\]/ s/.*/0/p' | head -1 > /tmp/$HYPRLAND_INSTANCE_SIGNATURE.wob #Mutes player audio
bindel = , XF86AudioRaiseVolume, exec, ~/.config/hypr/scripts/volume-helper.sh up
bindel = , XF86AudioLowerVolume, exec, ~/.config/hypr/scripts/volume-helper.sh down
bindel = , XF86AudioMute, exec, ~/.config/hypr/scripts/volume-helper.sh toggle
# ======= Playback Control =======