From 02182f1cb0d74f4c170559909e0ed5187da56f43 Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Wed, 2 Dec 2009 23:23:00 +0100 Subject: rc.lua: make use awful.menu.clients Attached to layoutbox until keygrabber support is added to the clients menu - at which point it will be a good enough imitation of the Alt+Tab applications switcher, as found in other desktop environments. --- rc.lua | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'rc.lua') diff --git a/rc.lua b/rc.lua index a595b0b..033f40b 100644 --- a/rc.lua +++ b/rc.lua @@ -234,9 +234,9 @@ vicious.register(volwidget, vicious.widgets.volume, "$1%", 2, "PCM") -- Register buttons volbar.widget:buttons(awful.util.table.join( awful.button({ }, 1, function () exec("kmix") end), - awful.button({ }, 2, function () exec("amixer -q sset Master toggle") end), - awful.button({ }, 4, function () exec("amixer -q sset PCM 2dB+") end), - awful.button({ }, 5, function () exec("amixer -q sset PCM 2dB-") end) + awful.button({ }, 2, function () exec("amixer -q sset Master toggle") end), + awful.button({ }, 4, function () exec("amixer -q sset PCM 2dB+", false) end), + awful.button({ }, 5, function () exec("amixer -q sset PCM 2dB-", false) end) )) volwidget:buttons( volbar.widget:buttons() ) -- }}} @@ -278,10 +278,13 @@ for s = 1, screen.count() do -- Create a layoutbox layoutbox[s] = awful.widget.layoutbox(s) layoutbox[s]:buttons(awful.util.table.join( - awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end), + awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end), awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end), - awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end), - awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end) + awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end), + awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end), + awful.button({ }, 2, function () if cmenu then cmenu:hide(); cmenu = nil + else cmenu = awful.menu.clients({ width = 215 }, true) end + end) )) -- Create the taglist -- cgit v1.2.3