You are not logged in.

#1 2013-05-30 23:08:16

navgeet
Member
Registered: 2012-05-06
Posts: 3

Awesome - How to "trap" a mouse click

I use the following code to use my mouse's side buttons for switching tags.
However the press events are forwarded to to the client underneath which is undesirable.
How do I "trap" the press events, if possible for specific tags only

root.buttons(awful.util.table.join(
    awful.button({ }, 3, function () mymainmenu:toggle() end),
    awful.button({ }, 8, awful.tag.viewnext),
    awful.button({ }, 9, awful.tag.viewprev)
))

Thanks.

Offline

#2 2013-05-31 00:04:25

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,552
Website

Re: Awesome - How to "trap" a mouse click

EDIT: I may have misunderstood - do you mean the binding works as you intended, but it also has additional undesired behavior in the client under the mouse?


--- original, perhaps irrelevant post ---
You want this mouse button to have that behavior when the mouse pointer is over a client window?

I have very little experience with awesomewm, but I know my way around X, and I suspect there is no way to do this within awesome.  Suspect may be too weak a word - unless awesome specifically includes button remapping code, this is not possible like that.

You can however remap mouse buttons through X, here is one guide that looks pretty good.  Once you remap the button in question to a "key", then you can just make a keybinding for that key.

Last edited by Trilby (2013-05-31 00:05:53)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB