Created
May 11, 2015 16:07
-
-
Save mikaelz/b85c8d97fcee55c33b88 to your computer and use it in GitHub Desktop.
Awesome WM config for multimedia keys to control Spotify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awful.key({ }, "XF86AudioPlay", function () awful.util.spawn_with_shell("dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause") end), | |
awful.key({ }, "XF86AudioNext", function () awful.util.spawn_with_shell("dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next") end), | |
awful.key({ }, "XF86AudioPrev", function () awful.util.spawn_with_shell("dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous") end) |
There is some way to make these keys work for Spotify and Rhythmbox?
Is this broken in the latest release of Spotify?
Works for me with
awesome v4.1 (Technologic)
• Compiled against Lua 5.3.4 (running with Lua 5.3)
• D-Bus support: ✔
• execinfo support: ✔
• xcb-randr version: 1.5
• LGI version: 0.9.1
Check your Dbus support
Try executing only the dbus command dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
I just set this up on my machine: https://github.com/acrisci/playerctl
Had it working fine on i3wm, working on adding it to awesome right now.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've wrote a helper function:
https://github.com/gunar/dotfiles/commit/e2eb4af9c1376a3dde0c3d6613a9aaba064dfd50