summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@gmail.com>2021-03-12 20:17:24 -0500
committerstreetturtle <streetturtle@gmail.com>2021-03-12 20:17:24 -0500
commita37e0a673ee3e6655f3d4be2c5a2f6c832476456 (patch)
treeae5086a2a95483edfc81bf4462723434cfd5e66e
parent223fe7226a6d8d0a48bb321ae1b307f635e9e65b (diff)
[logout-menu] highlight widget when the popup is shown
-rw-r--r--logout-menu-widget/logout-menu.lua18
1 files changed, 13 insertions, 5 deletions
diff --git a/logout-menu-widget/logout-menu.lua b/logout-menu-widget/logout-menu.lua
index 5277ef8..85311b0 100644
--- a/logout-menu-widget/logout-menu.lua
+++ b/logout-menu-widget/logout-menu.lua
@@ -17,12 +17,18 @@ local ICON_DIR = HOME .. '/.config/awesome/awesome-wm-widgets/logout-menu-widget
local logout_menu_widget = wibox.widget {
{
- image = ICON_DIR .. 'power_w.svg',
- resize = true,
- widget = wibox.widget.imagebox,
+ {
+ image = ICON_DIR .. 'power_w.svg',
+ resize = true,
+ widget = wibox.widget.imagebox,
+ },
+ margins = 4,
+ layout = wibox.container.margin
},
- margins = 4,
- layout = wibox.container.margin
+ shape = function(cr, width, height)
+ gears.shape.rounded_rect(cr, width, height, 4)
+ end,
+ widget = wibox.container.background,
}
local popup = awful.popup {
@@ -114,8 +120,10 @@ local function worker(user_args)
awful.button({}, 1, function()
if popup.visible then
popup.visible = not popup.visible
+ logout_menu_widget:set_bg('#00000000')
else
popup:move_next_to(mouse.current_widget_geometry)
+ logout_menu_widget:set_bg(beautiful.bg_focus)
end
end)
)