Bind the media keys to a specific media player
That's kind of how it used to work before the forced use of MPRIS. Without this change, only the latest used media player will receive the signal, which mean that, when I open a video on Firefox, the play-pause signal will be sent to Firefox and will therefore pause the video instead of the music I was listening to with Rythmbox.
This commit is contained in:
parent
449c161911
commit
bc516b04f9
1 changed files with 6 additions and 4 deletions
|
@ -10,6 +10,7 @@
|
|||
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
|
||||
|
||||
set $mod Mod4
|
||||
set $media_player rhythmbox
|
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
|
@ -150,10 +151,11 @@ bindsym Print exec scrot -e 'mv $f ~/pictures/ 2>/dev/null'
|
|||
bindsym $mod+l exec 'lock'
|
||||
|
||||
# Media player controls
|
||||
bindsym XF86AudioPlay exec playerctl play-pause
|
||||
bindsym XF86AudioPause exec playerctl play-pause
|
||||
bindsym XF86AudioNext exec playerctl next
|
||||
bindsym XF86AudioPrev exec playerctl previous
|
||||
|
||||
bindsym XF86AudioPlay exec playerctl --player $media_player play-pause
|
||||
bindsym XF86AudioPause exec playerctl --player $media_player play-pause
|
||||
bindsym XF86AudioNext exec playerctl --player $media_player next
|
||||
bindsym XF86AudioPrev exec playerctl --player $media_player previous
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
# finds out, if available)
|
||||
|
|
Loading…
Reference in a new issue