From 0054af2de3da8fb0cc0d2deb9738ceefc97ea5e7 Mon Sep 17 00:00:00 2001 From: streetturtle Date: Sat, 6 Mar 2021 13:13:46 -0500 Subject: [weather] highlight widget when the popup is shown --- weather-widget/weather.lua | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'weather-widget') 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))) -- cgit v1.2.3