forge
Explore
Log in

Don't you dare go Hollow

Include play/stop/prev/next media keys in the default config. (#2395)

Browse files at this commit

bffc5c137757b0b006391fa0e9fe996d3d044abdUnverifiedAnagram and Ivan MolodetskikhParent: c30e5c9
* Included example for media keys: play/pause, stop, previous and next in the default config

* Update resources/default-config.kdl

---------
resources/default-config.kdlmodified+7 -0
@@ -379,6 +379,13 @@ binds {
379 XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }379 XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }
380 XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; }380 XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; }
381 381
382+ // Example media keys mapping using playerctl.
383+ // This will work with any MPRIS-enabled media player.
384+ XF86AudioPlay allow-when-locked=true { spawn-sh "playerctl play-pause"; }
385+ XF86AudioStop allow-when-locked=true { spawn-sh "playerctl stop"; }
386+ XF86AudioPrev allow-when-locked=true { spawn-sh "playerctl previous"; }
387+ XF86AudioNext allow-when-locked=true { spawn-sh "playerctl next"; }
388+
382 // Example brightness key mappings for brightnessctl.389 // Example brightness key mappings for brightnessctl.
383 // You can use regular spawn with multiple arguments too (to avoid going through "sh"),390 // You can use regular spawn with multiple arguments too (to avoid going through "sh"),
384 // but you need to manually put each argument in separate "" quotes.391 // but you need to manually put each argument in separate "" quotes.