aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnagram <luis.henriques@gmail.com>2025-09-16 10:47:29 -0300
committerGitHub <noreply@github.com>2025-09-16 13:47:29 +0000
commitbffc5c137757b0b006391fa0e9fe996d3d044abd (patch)
treed8179136071449d831659c464eb1c10cf0e7d75c
parentc30e5c91851d77d48ff2120f0e710501b19d61b4 (diff)
downloadniri-bffc5c137757b0b006391fa0e9fe996d3d044abd.tar.gz
niri-bffc5c137757b0b006391fa0e9fe996d3d044abd.tar.bz2
niri-bffc5c137757b0b006391fa0e9fe996d3d044abd.zip
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 <yalterz@gmail.com>
-rw-r--r--resources/default-config.kdl7
1 files changed, 7 insertions, 0 deletions
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.