From eb03addf11e65f281c15cb60df28b385ca960f68 Mon Sep 17 00:00:00 2001 From: crater2150 Date: Mon, 26 Aug 2019 17:21:09 +0200 Subject: [PATCH] Fix MPD/Spotify hybrid control --- mybindings.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mybindings.lua b/mybindings.lua index 1e8702e..9d2bdfe 100644 --- a/mybindings.lua +++ b/mybindings.lua @@ -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),