From 449c1619111489d1d290c08d7165103349d9f8bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Tue, 12 Jul 2022 22:53:31 +0200 Subject: [PATCH] Add playerctl bindings to i3 Since version 3.4.5, Rhythmbox dropped the mmkeys plugin, stating that it is "no longer useful" and it "has been obsoleted by MPRIS". This change broke the media keys support on i3. Since the regression is on purpose, there might not be no way to get this mmkeys plugin back in Rhythmbox. The workaround is therefore to use MPRIS. I chose playerctl since it is the most straightforward to me. A few i3 key bindings later, media keys were back in control of Rhythmbox! https://gitlab.gnome.org/GNOME/rhythmbox/-/blob/v3.4.5/NEWS https://gitlab.gnome.org/GNOME/rhythmbox/-/commit/0cdeb7cb7a47fe3008ade7aaeb6482652b9c9daa https://wiki.archlinux.org/title/MPRIS https://i3wm.org/docs/userguide.html#keybindings --- .config/i3/config | 6 ++++++ README.md | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.config/i3/config b/.config/i3/config index 225e231..fa53950 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -149,6 +149,12 @@ bindsym Print exec scrot -e 'mv $f ~/pictures/ 2>/dev/null' # Screen lock 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 + # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) bar { diff --git a/README.md b/README.md index 8fae021..32d05ea 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ pacman -S skim # Rust pacman -S cargo-audit cargo-outdated cargo-release rustup # CLI software -pacman -S bind exiv2 imagemagick mkcert ncdu nmap rsync shellcheck sqlmap yt-dlp +pacman -S bind exiv2 imagemagick mkcert ncdu nmap playerctl rsync shellcheck sqlmap yt-dlp # WM pacman -S i3status pacman -S i3lock scrot