Skip to content

Instantly share code, notes, and snippets.

@mikaelz
Created May 11, 2015 16:07
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikaelz/b85c8d97fcee55c33b88 to your computer and use it in GitHub Desktop.
Save mikaelz/b85c8d97fcee55c33b88 to your computer and use it in GitHub Desktop.
Awesome WM config for multimedia keys to control Spotify
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)
@daraul
Copy link

daraul commented Jun 26, 2018

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