Skip to content

Commit 9a9a89e

Browse files
committed
fixed widget button bg color, fixed rows fg color
1 parent fd9c626 commit 9a9a89e

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

logout-menu-widget/logout-menu.lua

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ local function worker(user_args)
5858
local onpoweroff = args.onpoweroff or function() awful.spawn.with_shell("shutdown now") end
5959

6060
local menu_items = {
61-
{ name = 'Log out', icon_name = 'log-out.svg', command = onlogout },
62-
{ name = 'Lock', icon_name = 'lock.svg', command = onlock },
63-
{ name = 'Reboot', icon_name = 'refresh-cw.svg', command = onreboot },
64-
{ name = 'Suspend', icon_name = 'moon.svg', command = onsuspend },
65-
{ name = 'Power off', icon_name = 'power.svg', command = onpoweroff },
61+
{ name = 'Log out', icon_name = 'log-out.svg', command = function () logout_menu_widget:set_bg('#00000000') onlogout() end },
62+
{ name = 'Lock', icon_name = 'lock.svg', command = function () logout_menu_widget:set_bg('#00000000') onlock() end },
63+
{ name = 'Reboot', icon_name = 'refresh-cw.svg', command = function () logout_menu_widget:set_bg('#00000000') onreboot() end },
64+
{ name = 'Suspend', icon_name = 'moon.svg', command = function () logout_menu_widget:set_bg('#00000000') onsuspend() end },
65+
{ name = 'Power off', icon_name = 'power.svg', command = function () logout_menu_widget:set_bg('#00000000') onpoweroff() end },
6666
}
6767

6868
for _, item in ipairs(menu_items) do
@@ -86,12 +86,13 @@ local function worker(user_args)
8686
margins = 8,
8787
layout = wibox.container.margin
8888
},
89+
fg = beautiful.fg_normal,
8990
bg = beautiful.bg_normal,
9091
widget = wibox.container.background
9192
}
9293

93-
row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end)
94-
row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end)
94+
row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) c:set_fg(beautiful.fg_focus) end)
95+
row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) c:set_fg(beautiful.fg_normal) end)
9596

9697
local old_cursor, old_wibox
9798
row:connect_signal("mouse::enter", function()

0 commit comments

Comments
 (0)