diff options
Diffstat (limited to 'weather-widget')
-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))) |