Musique : activation du contrôle par le clavier de MPV

This commit is contained in:
Olivier DOSSMANN 2019-12-23 15:40:13 +01:00
parent 82d12ba231
commit 9c7fd84df5
2 changed files with 11 additions and 0 deletions

View File

@ -190,6 +190,16 @@ bindsym XF86AudioMute exec pactl set-sink-mute $sink toggle # mute sound
bindsym XF86MonBrightnessUp exec xbacklight -inc 5 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 5 # decrease screen brightness
# Player controls (via MPRIS, in example mpv-mpris)
# play/pause
bindsym XF86AudioPlay exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.mpv /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
# next file/music/movie
bindsym XF86AudioNext exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.mpv /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
# previous file/music/movie
bindsym XF86AudioPrev exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.mpv /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
# stop file/music/movie
bindsym XF86AudioStop exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.mpv /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop"
# Lock screen
bindsym $mod+l exec i3lock -bfte -i ~/.config/i3/matrix-elements-design.png

View File

@ -0,0 +1 @@
/usr/lib/mpv/mpris.so