From 1495df51bae050bb118985dbdec17a924ad65514 Mon Sep 17 00:00:00 2001 From: Anurag Priyam Date: Sun, 24 Apr 2011 20:54:43 +0530 Subject: [PATCH] awesomerc: minimize/restore client on a left click in the tasklist entry In the bundled rc.lua, mouse button 1 on a tasklist entry was configured to bring the corresponding client to focus. Modify it to minimize the client if already focussed. Such (default) behavior seems more natural. Signed-off-by: Anurag Priyam Signed-off-by: Uli Schlachter --- awesomerc.lua.in | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/awesomerc.lua.in b/awesomerc.lua.in index ea99e167..650df816 100644 --- a/awesomerc.lua.in +++ b/awesomerc.lua.in @@ -91,11 +91,17 @@ mytaglist.buttons = awful.util.table.join( mytasklist = {} mytasklist.buttons = awful.util.table.join( awful.button({ }, 1, function (c) - if not c:isvisible() then - awful.tag.viewonly(c:tags()[1]) + if c == client.focus then + c.minimized = true + else + if not c:isvisible() then + awful.tag.viewonly(c:tags()[1]) + end + -- This will also un-minimize + -- the client, if needed + client.focus = c + c:raise() end - client.focus = c - c:raise() end), awful.button({ }, 3, function () if instance then