diff options
author | Sam Delmerico <svdelmerico@gmail.com> | 2018-11-26 16:21:48 -0500 |
---|---|---|
committer | Sam Delmerico <svdelmerico@gmail.com> | 2018-11-26 16:21:48 -0500 |
commit | 2cf217dc6c45f206aef0e065fa3ede4c36d73e3b (patch) | |
tree | a257f029216862d7525ca7e6e1818982b4a03085 /volumearc-widget | |
parent | f369e1cb28a308f6967d7bc31375c637755b1e3f (diff) | |
parent | 1eefac87faefa22b0d3941a9fd4c76010688f59e (diff) |
merge biased battery levels
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) |