This commit is contained in:
Uli Schlachter 2015-10-10 19:58:45 +02:00
commit b34a653448
1 changed files with 18 additions and 11 deletions

View File

@ -73,6 +73,21 @@ awful.layout.layouts = {
}
-- }}}
-- {{{ Helper functions
local function client_menu_toggle_fn()
local instance = nil
return function ()
if instance and instance.wibox.visible then
instance:hide()
instance = nil
else
instance = awful.menu.clients({ theme = { width = 250 } })
end
end
end
-- }}}
-- {{{ Wallpaper
if beautiful.wallpaper then
for s = 1, screen.count() do
@ -130,7 +145,8 @@ mytaglist.buttons = awful.util.table.join(
awful.button({ modkey }, 3, awful.client.toggletag),
awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end),
awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end)
)
)
mytasklist = {}
mytasklist.buttons = awful.util.table.join(
awful.button({ }, 1, function (c)
@ -149,16 +165,7 @@ mytasklist.buttons = awful.util.table.join(
c:raise()
end
end),
awful.button({ }, 3, function ()
if instance then
instance:hide()
instance = nil
else
instance = awful.menu.clients({
theme = { width = 250 }
})
end
end),
awful.button({ }, 3, client_menu_toggle_fn()),
awful.button({ }, 4, function ()
awful.client.focus.byidx(1)
end),