On Mon, Mar 16, 2009 at 06:13:38PM -0400, Andrei Thorp wrote:

> Well, if you've gone through all this trouble, you might as well write
> us a patch :)

Well, ok ... see attached patch against awesomerc.lua.in in the git repository.

brgds,
/frax


> 
> -AT
> 
> On Mon, Mar 16, 2009 at 5:49 PM, Fredrik Ax <[email protected]> wrote:
> > On Mon, Mar 16, 2009 at 05:30:31PM +0100, Fredrik Ax wrote:
> >
> >> This just a very minor suggestion so I don't bother submit an
> >> enhancment level bugreport or send a real patch (just a few characters
> >> added to one line).
> >>
> >> In the default awesome 3.2 rc.lua (line 137, at least in the one that
> >> ships with the Debian sid package) you have this binding for hitting
> >> mouse button 3 on the tasklist:
> >>
> >>   button({ }, 3, function () if instance then instance:hide() end instance 
> >> = awful.menu.clients({ width=250 }) end),
> >>
> >> I think the behaviour you achieve with the below is much nicer (if you
> >> hit the tasklist with mouse button three whilst the clients-menu is
> >> already shown, it gets hidden instead of moved):
> >>
> >>   button({ }, 3, function () if instance then instance:toggle() else 
> >> instance = awful.menu.clients({ width=250 }) end end),
> >
> > Ehhh ... stupid me ... the above will not work ... since the clients
> > might change between each time we need to recreate the menu each time.
> > This will do the trick and provide the desired behavior:
> >
> >   button({ }, 3, function () if instance then instance:hide() instance = 
> > nil else instance = awful.menu.clients({ width=250 }) end end),

--- awesomerc.lua.in.orig	2009-03-17 09:31:00.000000000 +0100
+++ awesomerc.lua.in	2009-03-17 09:53:05.000000000 +0100
@@ -130,7 +130,7 @@
                                           client.focus = c
                                           c:raise()
                                       end),
-                       button({ }, 3, function () if instance then instance:hide() end instance = awful.menu.clients({ width=250 }) end),
+                       button({ }, 3, function () if instance then instance:hide() instance = nil else instance = awful.menu.clients({ width=250 }) end end),
                        button({ }, 4, function ()
                                           awful.client.focus.byidx(1)
                                           if client.focus then client.focus:raise() end

Reply via email to