i3: utilisation de playerctl pour les touches play/pause/stop/préc./suiv.

This commit is contained in:
Olivier DOSSMANN 2020-04-07 18:22:24 +02:00
parent e9e768751e
commit ab2f042909

View File

@ -192,13 +192,13 @@ bindsym XF86MonBrightnessDown exec xbacklight -dec 5 # decrease screen brightnes
# 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"
bindsym XF86AudioPlay exec "playerctl play-pause"
# next file/music/movie
bindsym XF86AudioNext exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.mpv /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
bindsym XF86AudioNext exec "playerctl 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"
bindsym XF86AudioPrev exec "playerctl 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"
bindsym XF86AudioStop exec "playerctl stop"
# Lock screen
bindsym $mod+l exec i3lock -bfte -i ~/.config/i3/matrix-elements-design.png