Hi,

Attached patch modifies the bundled rc.lua (awesomerc).

>From the commit message:
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.

-- 
Anurag Priyam
http://about.me/yeban/
From 7d9738d60ad5acc22d3369e4f6ba486b3dc8b7a2 Mon Sep 17 00:00:00 2001
From: Anurag Priyam <[email protected]>
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 <[email protected]>
---
 awesomerc.lua.in |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/awesomerc.lua.in b/awesomerc.lua.in
index 9b1e9aa..c661676 100644
--- a/awesomerc.lua.in
+++ b/awesomerc.lua.in
@@ -90,11 +90,15 @@ 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 = not c.minimized
+                                              else
+                                                  if not c:isvisible() then
+                                                      awful.tag.viewonly(c:tags()[1])
+                                                  end
+                                                  client.focus = c
+                                                  c:raise()
                                               end
-                                              client.focus = c
-                                              c:raise()
                                           end),
                      awful.button({ }, 3, function ()
                                               if instance then
-- 
1.7.4.4

Reply via email to