summaryrefslogtreecommitdiff
path: root/volumearc-widget/volumearc.lua
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@gmail.com>2020-06-29 22:38:13 -0400
committerstreetturtle <streetturtle@gmail.com>2020-06-29 22:38:13 -0400
commit67b947ba8869b41e9afa710bf3e82a6ad06effba (patch)
tree09351b81b5935ddca6ce8cf69ab4c2614f56217d /volumearc-widget/volumearc.lua
parent36595c9d9c7ce9887d3185a8271a90c29b9593c6 (diff)
parent2cab18315b9fffeede00d586693b65ce401a2dc4 (diff)
Merge branch 'master' of github.com:streetturtle/awesome-wm-widgets
Diffstat (limited to 'volumearc-widget/volumearc.lua')
-rw-r--r--volumearc-widget/volumearc.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/volumearc-widget/volumearc.lua b/volumearc-widget/volumearc.lua
index eb2ff68..c582c10 100644
--- a/volumearc-widget/volumearc.lua
+++ b/volumearc-widget/volumearc.lua
@@ -69,7 +69,7 @@ local function worker(args)
or { main_color }
end
- volumearc:connect_signal("button::press", function(_, _, _, button)
+ local button_press = args.button_press or function(_, _, _, button)
if (button == 4) then awful.spawn(inc_volume_cmd, false)
elseif (button == 5) then awful.spawn(dec_volume_cmd, false)
elseif (button == 1) then awful.spawn(tog_volume_cmd, false)
@@ -78,7 +78,8 @@ local function worker(args)
spawn.easy_async(get_volume_cmd, function(stdout, stderr, exitreason, exitcode)
update_graphic(volumearc, stdout, stderr, exitreason, exitcode)
end)
- end)
+ end
+ volumearc:connect_signal("button::press", button_press)
watch(get_volume_cmd, 1, update_graphic, volumearc)