From a37e0a673ee3e6655f3d4be2c5a2f6c832476456 Mon Sep 17 00:00:00 2001 From: streetturtle Date: Fri, 12 Mar 2021 20:17:24 -0500 Subject: [logout-menu] highlight widget when the popup is shown --- logout-menu-widget/logout-menu.lua | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'logout-menu-widget') 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) ) -- cgit v1.2.3