From 8c9f36277d52f134410f6199243983f4236da227 Mon Sep 17 00:00:00 2001 From: Hilton Chain Date: Mon, 12 Jan 2026 21:37:44 +0800 Subject: [PATCH] examples: Update niri.kdl. * modules/rosenthal/examples/niri.kdl: Update. --- modules/rosenthal/examples/niri.kdl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/rosenthal/examples/niri.kdl b/modules/rosenthal/examples/niri.kdl index c50a748..a92e725 100644 --- a/modules/rosenthal/examples/niri.kdl +++ b/modules/rosenthal/examples/niri.kdl @@ -381,11 +381,19 @@ binds { // Example volume keys mappings for PipeWire & WirePlumber. // The allow-when-locked=true property makes them work even when the session is locked. // Using spawn-sh allows to pass multiple arguments together with the command. - XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+"; } + // "-l 1.0" limits the volume to 100%. + XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+ -l 1.0"; } XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; } XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; } XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; } + // Example media keys mapping using playerctl. + // This will work with any MPRIS-enabled media player. + XF86AudioPlay allow-when-locked=true { spawn-sh "playerctl play-pause"; } + XF86AudioStop allow-when-locked=true { spawn-sh "playerctl stop"; } + XF86AudioPrev allow-when-locked=true { spawn-sh "playerctl previous"; } + XF86AudioNext allow-when-locked=true { spawn-sh "playerctl next"; } + // Example brightness key mappings for light. // You can use regular spawn with multiple arguments too (to avoid going through "sh"), // but you need to manually put each argument in separate "" quotes.