Fix MPD/Spotify hybrid control
This commit is contained in:
parent
2699230f05
commit
eb03addf11
|
@ -78,11 +78,11 @@ local myglobalkeys = awful.util.table.join(
|
|||
--{{{ Modal mappings
|
||||
|
||||
awful.key({ modkey }, "m", function()
|
||||
awful.spawn.easy_async("playerctl -p spotify status", function(stdout, stderr, reason, exitcode)
|
||||
awful.spawn.easy_async("which playerctl && playerctl -p spotify status", function(stdout, stderr, reason, exitcode)
|
||||
if exitcode > 0 then
|
||||
mb.grab(mpdmap, "MPD", true)
|
||||
mb.grab{keymap=mpdmap, name="MPD", stay_in_mode=true}
|
||||
else
|
||||
mb.grab(mprismap, "Spotify", true)
|
||||
mb.grab{keymap=mprismap, name="Spotify", stay_in_mode=true}
|
||||
end
|
||||
end)
|
||||
end),
|
||||
|
|
Loading…
Reference in a new issue