Paul Ozog | 9 May 04:30 2011
Picon

Double click in rc.lua

In the default rc.lua, there is something like:


clientbuttons = awful.util.table.join(
   awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
   awful.button({ modkey }, 1, awful.mouse.client.move),
   awful.button({ modkey }, 3, awful.mouse.client.resize))
 
I would like to use a double click event.  More specifically, if a user double-right-clicks on a focused window, I want to kill() that window.  How can I do this in lua?  I'm used to these things pre-implemented as in gtk, etc.

--
Paul

Jörg Thalheim | 9 May 16:12 2011
Picon

Re: Double click in rc.lua

Currently no. But the underlying library allow this (through timestamps):
http://www.x.org/releases/X11R7.6/doc/libxcb/tutorial/index.html#userinput
You could simulate it, by measuring the time between clicks, but
because it's async it would not work very well.
Why not open a feature request on bug tracker?

2011/5/9 Paul Ozog <pjozog <at> gmail.com>:
> In the default rc.lua, there is something like:
> clientbuttons = awful.util.table.join(
>    awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
>    awful.button({ modkey }, 1, awful.mouse.client.move),
>    awful.button({ modkey }, 3, awful.mouse.client.resize))
>
> I would like to use a double click event.  More specifically, if a user
> double-right-clicks on a focused window, I want to kill() that window.  How
> can I do this in lua?  I'm used to these things pre-implemented as in gtk,
> etc.
> --
> Paul
>
>

--

-- 
Gruß Jörg


Gmane