diff --git a/docs/user/keybinds.md b/docs/user/keybinds.md index 19ea19d5..b5d1fc29 100644 --- a/docs/user/keybinds.md +++ b/docs/user/keybinds.md @@ -313,9 +313,9 @@ and widgets via `noctalia msg`. Typical bindings: ## Example: media and brightness keys ```toml -# Volume (via Noctalia OSD) -"XF86AudioRaiseVolume" = "spawn:noctalia msg volume-up 2%" -"XF86AudioLowerVolume" = "spawn:noctalia msg volume-down 2%" +# Volume +"XF86AudioRaiseVolume" = "spawn:wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+" +"XF86AudioLowerVolume" = "spawn:wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" "Mod+XF86AudioMute" = "spawn:wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" # Media playback (playerctl) @@ -331,3 +331,5 @@ and widgets via `noctalia msg`. Typical bindings: XF86 keys accept the same `Mod`, `Ctrl`, `Alt`, `Shift`, and `Super` combinations as other keys. Modifier chords also work when the XF86 key is reported by a separate laptop hotkey device. + +Volume control requires `wpctl` (from WirePlumber/PipeWire) while media playback requires `playerctl`. diff --git a/examples/config.toml b/examples/config.toml index 96c2d290..32a4f477 100644 --- a/examples/config.toml +++ b/examples/config.toml @@ -221,6 +221,14 @@ follows_mouse = false # "Mod+C" = "window-center" # "Mod+Shift+T" = "workspace-set-layout:toggle" +# Media and volume (see docs/user/keybinds.md#example-media-and-brightness-keys) +# "XF86AudioRaiseVolume" = "spawn:wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+" +# "XF86AudioLowerVolume" = "spawn:wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" +# "Mod+XF86AudioMute" = "spawn:wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" +# "XF86AudioPlay" = "spawn:playerctl play-pause" +# "XF86AudioNext" = "spawn:playerctl next" +# "XF86AudioPrev" = "spawn:playerctl prev" + # Window and layer rules (see docs/user/rules.md) --------------------------- # [[window_rule]]