From 97d6309b3aeb36fa151d77f656073174311f3cbd Mon Sep 17 00:00:00 2001 From: Toma Adrian Ionut Date: Sun, 6 Nov 2022 14:48:31 +0200 Subject: [PATCH] menu_width and menu_height in vertex theme --- themes/vertex/rc.lua.custom | 49 ++++++++++++++++++++----------------- themes/vertex/theme.lua | 4 +-- 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/themes/vertex/rc.lua.custom b/themes/vertex/rc.lua.custom index 0b46b66..fda668c 100644 --- a/themes/vertex/rc.lua.custom +++ b/themes/vertex/rc.lua.custom @@ -199,25 +199,24 @@ awful.util.mymainmenu = freedesktop.menu.build { before = {{"Awesome", myawesomemenu, beautiful.awesome_icon} -- other triads can be put here }, after = {{"Open terminal", terminal} -- other triads can be put here - }, - width = 250 + } } -- Hide the menu when the mouse leaves it --- awful.util.mymainmenu.wibox:connect_signal("mouse::leave", function() --- if not awful.util.mymainmenu.active_child or --- (awful.util.mymainmenu.wibox ~= mouse.current_wibox and awful.util.mymainmenu.active_child.wibox ~= --- mouse.current_wibox) then --- awful.util.mymainmenu:hide() --- else --- awful.util.mymainmenu.active_child.wibox:connect_signal("mouse::leave", function() --- if awful.util.mymainmenu.wibox ~= mouse.current_wibox then --- awful.util.mymainmenu:hide() --- end --- end) --- end --- end) +awful.util.mymainmenu.wibox:connect_signal("mouse::leave", function() + if not awful.util.mymainmenu.active_child or + (awful.util.mymainmenu.wibox ~= mouse.current_wibox and awful.util.mymainmenu.active_child.wibox ~= + mouse.current_wibox) then + awful.util.mymainmenu:hide() + else + awful.util.mymainmenu.active_child.wibox:connect_signal("mouse::leave", function() + if awful.util.mymainmenu.wibox ~= mouse.current_wibox then + awful.util.mymainmenu:hide() + end + end) + end +end) -- Set the Menubar terminal for applications that require it -- menubar.utils.terminal = terminal @@ -357,12 +356,12 @@ end, { description = "focus right", group = "client" }), -- Menu -awful.key({modkey}, "w", function() - awful.util.mymainmenu:show() -end, { - description = "show main menu", - group = "awesome" -}), -- Layout manipulation +-- awful.key({modkey}, "w", function() +-- awful.util.mymainmenu:show() +-- end, { +-- description = "show main menu", +-- group = "awesome" +-- }), -- Layout manipulation awful.key({modkey, "Shift"}, "j", function() awful.client.swap.byidx(1) end, { @@ -539,7 +538,13 @@ end, { -- description = "show weather", -- group = "widgets" -- }), --- Screen brightness +-- User programs +awful.key({modkey}, "w", function() + awful.spawn(browser) +end, { + description = "run browser", + group = "launcher" +}), -- Screen brightness awful.key({}, "#233", function() os.execute("light -A 10") end, { diff --git a/themes/vertex/theme.lua b/themes/vertex/theme.lua index d8063d1..337a3ea 100644 --- a/themes/vertex/theme.lua +++ b/themes/vertex/theme.lua @@ -31,8 +31,8 @@ theme.border_normal = "#252525" theme.border_focus = "#7CA2EE" theme.tooltip_border_color = theme.fg_focus theme.tooltip_border_width = theme.border_width -theme.menu_height = dpi(24) -theme.menu_width = dpi(140) +theme.menu_height = dpi(32) +theme.menu_width = dpi(300) theme.awesome_icon = theme.icon_dir .. "/awesome.png" theme.taglist_squares_sel = gears.surface.load_from_shape(dpi(3), dpi(30), gears.shape.rectangle, theme.fg_focus) theme.taglist_squares_unsel = gears.surface.load_from_shape(dpi(3), dpi(30), gears.shape.rectangle, theme.bg_focus2)