summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@users.noreply.github.com>2018-11-02 14:28:26 -0400
committerGitHub <noreply@github.com>2018-11-02 14:28:26 -0400
commit4215fc7e92ef168c1daabc7db227c3748c1edda4 (patch)
treec83686abeb870970a8191250439df17e70197eb7
parentf63cfbc96b6a796f35b7b6dc41054b9136084543 (diff)
parent4614f1cee5e301bc99775424636f55e673e8c346 (diff)
Merge pull request #55 from hramezani/mpdarc_widget_toggle
Define TOGGLE_MPD_CMD and use it for mpdarc-widget.
-rw-r--r--mpdarc-widget/mpdarc.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/mpdarc-widget/mpdarc.lua b/mpdarc-widget/mpdarc.lua
index 56009ef..7b8aea3 100644
--- a/mpdarc-widget/mpdarc.lua
+++ b/mpdarc-widget/mpdarc.lua
@@ -14,6 +14,7 @@ local wibox = require("wibox")
local naughty = require("naughty")
local GET_MPD_CMD = "mpc status"
+local TOGGLE_MPD_CMD = "mpc toggle"
local PAUSE_MPD_CMD = "mpc pause"
local STOP_MPD_CMD = "mpc stop"
local NEXT_MPD_CMD = "mpc next"
@@ -66,7 +67,7 @@ local update_graphic = function(widget, stdout, _, _, _)
end
mpdarc:connect_signal("button::press", function(_, _, _, button)
- if (button == 1) then awful.spawn("mpc toggle", false) -- left click
+ if (button == 1) then awful.spawn(TOGGLE_MPD_CMD, false) -- left click
elseif (button == 2) then awful.spawn(STOP_MPD_CMD, false)
elseif (button == 3) then awful.spawn(PAUSE_MPD_CMD, false)
elseif (button == 4) then awful.spawn(NEXT_MPD_CMD, false) -- scroll up