diff options
author | Pavel Makhov <pmakhov@touchtunes.com> | 2018-10-04 10:26:27 -0400 |
---|---|---|
committer | Pavel Makhov <pmakhov@touchtunes.com> | 2018-10-04 10:26:27 -0400 |
commit | 46541730ebd93eb90e006da832c3ba4bdecfe699 (patch) | |
tree | 3e56bfb9b2714bb7c8b2c81bd6ce8fc220f710e0 /volumearc-widget | |
parent | 9c181c5c7002947c61f0632f8d8d395ac48afa58 (diff) |
refactor volumebar/arc widgets
Diffstat (limited to 'volumearc-widget')
-rw-r--r-- | volumearc-widget/volumearc.lua | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/volumearc-widget/volumearc.lua b/volumearc-widget/volumearc.lua index c2c0af9..9cd7865 100644 --- a/volumearc-widget/volumearc.lua +++ b/volumearc-widget/volumearc.lua @@ -5,7 +5,7 @@ -- https://github.com/streetturtle/awesome-wm-widgets/tree/master/volumearc-widget -- @author Pavel Makhov --- @copyright 2017 Pavel Makhov +-- @copyright 2018 Pavel Makhov ------------------------------------------------- local awful = require("awful") @@ -38,11 +38,9 @@ local update_graphic = function(widget, stdout, _, _, _) volume = tonumber(string.format("% 3d", volume)) widget.value = volume / 100; - if mute == "off" then - widget.colors = { beautiful.widget_red } - else - widget.colors = { beautiful.widget_main_color } - end + widget.colors = mute == 'off' and { beautiful.widget_red } + or { beautiful.widget_main_color } + end volumearc:connect_signal("button::press", function(_, _, _, button) |