Volume control with mouse

This commit is contained in:
Thomas Avé 2026-08-11 10:20:39 +02:00
parent 2627eda709
commit 54f0e0bbc5
Signed by: thomasave
SSH Key Fingerprint: SHA256:bvIbWy6TO9+PdMTPzWy6dqkRlVQ3eSky+vQcc9aRIiE
1 changed files with 4 additions and 3 deletions

View File

@ -260,9 +260,10 @@ in {
XF86AudioMute { spawn "${wpctl}" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
XF86AudioMicMute { spawn "${wpctl}" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
// Horizontal mouse scroll controls volume
WheelScrollRight cooldown-ms=10 { spawn "${wpctl}" "set-volume" "@DEFAULT_AUDIO_SINK@" "1%+" "--limit" "1.0"; }
WheelScrollLeft cooldown-ms=10 { spawn "${wpctl}" "set-volume" "@DEFAULT_AUDIO_SINK@" "1%-"; }
// Ctrl + horizontal mouse scroll controls volume
// (unmodified WheelScroll binds capture the whole wheel in niri and break normal scrolling)
Ctrl+Alt+WheelScrollRight cooldown-ms=10 { spawn "${wpctl}" "set-volume" "@DEFAULT_AUDIO_SINK@" "1%+" "--limit" "1.0"; }
Ctrl+Alt+WheelScrollLeft cooldown-ms=10 { spawn "${wpctl}" "set-volume" "@DEFAULT_AUDIO_SINK@" "1%-"; }
// Mod + horizontal scroll moves between windows (columns) left/right
Mod+WheelScrollRight cooldown-ms=200 { focus-column-right; }