Include play/stop/prev/next media keys in the default config. (#2395)
Browse files at this commit1 changed file +7 -0
resources/default-config.kdlmodified+7 -0
| @@ -379,6 +379,13 @@ binds { | ||
| 379 | 379 | XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; } |
| 380 | 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 | 389 | // Example brightness key mappings for brightnessctl. |
| 383 | 390 | // You can use regular spawn with multiple arguments too (to avoid going through "sh"), |
| 384 | 391 | // but you need to manually put each argument in separate "" quotes. |