diff options
author | streetturtle <streetturtle@gmail.com> | 2021-03-06 13:13:46 -0500 |
---|---|---|
committer | streetturtle <streetturtle@gmail.com> | 2021-03-06 13:13:46 -0500 |
commit | 0054af2de3da8fb0cc0d2deb9738ceefc97ea5e7 (patch) | |
tree | 76d2adc222981a1b512b103727a375ff0c360048 | |
parent | f46afcf1ce506a4e6b390e7dd13a0f4ca853e5e2 (diff) |
[weather] highlight widget when the popup is shown
-rw-r--r-- | weather-widget/weather.lua | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/weather-widget/weather.lua b/weather-widget/weather.lua index 4df43ea..84e75d8 100644 --- a/weather-widget/weather.lua +++ b/weather-widget/weather.lua @@ -149,18 +149,28 @@ local function worker(user_args) weather_widget = wibox.widget { { { - id = 'icon', - resize = true, - widget = wibox.widget.imagebox + { + { + id = 'icon', + resize = true, + widget = wibox.widget.imagebox + }, + valign = 'center', + widget = wibox.container.place, + }, + { + id = 'txt', + widget = wibox.widget.textbox + }, + layout = wibox.layout.fixed.horizontal, }, - valign = 'center', - widget = wibox.container.place, + margins = 4, + layout = wibox.container.margin }, - { - id = 'txt', - widget = wibox.widget.textbox - }, - layout = wibox.layout.fixed.horizontal, + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, 4) + end, + widget = wibox.container.background, set_image = function(self, path) self:get_children_by_id('icon')[1].image = path end, @@ -530,8 +540,10 @@ local function worker(user_args) weather_widget:buttons(awful.util.table.join(awful.button({}, 1, function() if weather_popup.visible then + weather_widget:set_bg('#00000000') weather_popup.visible = not weather_popup.visible else + weather_widget:set_bg(beautiful.bg_focus) weather_popup:move_next_to(mouse.current_widget_geometry) end end))) |