How to prevent passthrough of mouse scroll bind to a client?
My goal is to create a set of binds involving the scroll wheel while preventing the scroll wheel action being passed to the client.
Longer explanation in order to avoid the XY Problem:
My goal is to have a bind accessible from anywhere (awful.mouse.append_global_mousebindings + awful.mouse.append_client_mousebindings) invoked via Mod4 + 4 (read: Super + Scroll Up) that will increase my system volume (invoke a function) while preventing the client under my mouse (if any) from knowing that I have used the scroll wheel.
Here's a list of solutions I've tried so far:
https://gist.github.com/adamnejm/41c43ff5ff16d84c242d93f33bb85d0f
(each file is a separate attempt with comments explaining the fix and describing the outcome)
The only other solution I can think of is to change the actual mouse scroll buttons to something else, whether in the firmware or via X11 configuration and possibly faking the scroll wheel inputs using a different set of binds, I would however really like to keep things simple and retain the default scroll wheel behavior.
If anybody has a solution to my problem or can point me in the right direction, I'd really appreciate that, thanks!
Edit: The solution from a recent post How to "not" pass input to the client? which links to wooparadog's answer regarding mousegrabber doesn't work for me on the default rc.lua on the latest AwesomeWM (commit 9ca7bb4 ~9 days old)
Posted Jul 9, 2022, 11:50 AM UTC · edited
Not a solution to your passthrough issue, but i am using smart_borders with volume control on scroll wheel. This lets me change the volume on any client border. I just have to move the mouse to edge of the screen and scroll without having to press any other button.
The module also provides hot borders which lets you add custom actions like volume control on the corner of the screen in case you don't want to change your titlebar/border setup.