From bffc5c137757b0b006391fa0e9fe996d3d044abd Mon Sep 17 00:00:00 2001 From: Anagram Date: Tue, 16 Sep 2025 10:47:29 -0300 Subject: [PATCH] Include play/stop/prev/next media keys in the default config. (#2395) * Included example for media keys: play/pause, stop, previous and next in the default config * Update resources/default-config.kdl --------- Co-authored-by: Ivan Molodetskikh --- resources/default-config.kdl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/default-config.kdl b/resources/default-config.kdl index 3ddf40a5..69afe99d 100644 --- a/resources/default-config.kdl +++ b/resources/default-config.kdl @@ -379,6 +379,13 @@ binds { 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 brightnessctl. // 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.