1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2024-12-22 19:22:32 +00:00

holo: fixed main menu launcher

This commit is contained in:
copycat-killer 2017-01-29 18:23:52 +01:00
parent 6fdc24f085
commit 98d06fd4e8
2 changed files with 19 additions and 12 deletions

View file

@ -166,7 +166,8 @@ local myawesomemenu = {
{ "restart", awesome.restart },
{ "quit", function() awesome.quit() end }
}
local mymainmenu = freedesktop.menu.build({
awful.util.mymainmenu = freedesktop.menu.build({
icon_size = beautiful.menu_icon_size or 16,
before = {
{ "Awesome", myawesomemenu, beautiful.awesome_icon },
-- other triads can be put here
@ -198,7 +199,7 @@ awful.screen.connect_for_each_screen(function(s) beautiful.at_screen_connect(s)
-- {{{ Mouse bindings
root.buttons(awful.util.table.join(
awful.button({ }, 3, function () mymainmenu:toggle() end),
awful.button({ }, 3, function () awful.util.mymainmenu:toggle() end),
awful.button({ }, 4, awful.tag.viewnext),
awful.button({ }, 5, awful.tag.viewprev)
))
@ -262,7 +263,7 @@ globalkeys = awful.util.table.join(
awful.client.focus.bydirection("right")
if client.focus then client.focus:raise() end
end),
awful.key({ modkey, }, "w", function () mymainmenu:show() end,
awful.key({ modkey, }, "w", function () awful.util.mymainmenu:show() end,
{description = "show main menu", group = "awesome"}),
-- Layout manipulation

View file

@ -33,8 +33,9 @@ theme.tasklist_bg_normal = "#222222"
theme.tasklist_fg_focus = "#4CB7DB"
theme.menu_height = 20
theme.menu_width = 160
theme.awesome_icon = theme.icon_dir .. "/awesome_icon.png"
theme.awesome_icon_white = theme.icon_dir .. "/awesome_icon_white.png"
theme.menu_icon_size = 32
theme.awesome_icon = theme.icon_dir .. "/awesome_icon_white.png"
theme.awesome_icon_launcher = theme.icon_dir .. "/awesome_icon.png"
theme.vol_bg = theme.icon_dir .. "/vol_bg.png"
theme.taglist_squares_sel = theme.icon_dir .. "/square_sel.png"
theme.taglist_squares_unsel = theme.icon_dir .. "/square_unsel.png"
@ -265,6 +266,11 @@ theme.weather = lain.widgets.weather({
notification_preset = { font = "Monospace 9", position = "bottom_right" },
})
-- Launcher
local mylauncher = awful.widget.button({ image = theme.awesome_icon_launcher })
mylauncher:connect_signal("button::press", function() awful.util.mymainmenu:toggle() end)
--awful.widget.launcher({ image = theme.awesome_icon_launcher, command = awful.util.mymainmenu:toggle() })
-- Separators
local first = wibox.widget.textbox('<span font="Roboto 7"> </span>')
local spr_small = wibox.widget.imagebox(theme.spr_small)