Closed checkem closed 7 years ago
Hello!
Here are a few points:
wew
expects a number as its mask, not a "name". so wew -m XCB_EVENT_MASK_KEY_PRESS
should instead be wew -m 1
KEY_PRESS
event is not handled yet (no plan to do so myself): https://github.com/wmutils/opt/blob/master/wew.c#L175KEY_PRESS
is for keyboard events. The mouse pointer triggers BUTTON_PRESS
eventsSo to give an answer to your question, I wrote wew
for myself, to improve my wmutils experience, and don't plan to do much support for it (because it's a bit hacky and misbehaving). If people send me patches to improve it without breaking it, I can merge them, but I won't do anything myself unless my needs change.
If you provide me a patch that would work for BUTTON_*
events, I can probably merge them. Otherwise you can wait for this to, perhaps, be implemented in the future.
What event masks are handled by now? Is it only focus and enter events?
The events handled are the one listed in the function linked above. "Handling" simply means returning the window ID attribute for this event. There are ~10 events handled for now
So, as I understand, wew returns cliend ID and the event value as a number. Are there plans to expand the program so that it returns additional data? I, for example, want to know the position of a mouse poiner relative to the screen or the root window(ie root_x, root_y for xlib). In other hand, if wew stands for 'window events watcher' it wouldn't be logical to put such outputs to this one. Or is there any way to get such data using inside a bash script having the wews 'ev' output? Do not judge me too hard, I am doing this for educational purposes.
À dim. mars 12 03:47:36 2017 GMT+0100, checkem a écrit :
So, as I understand, wew returns cliend ID and the event value as a number. Is there plans to expand the program so that it returns additional data? I, for example, want to know the position of a mouse poiner relative to the screen or the root window(ie root_x, root_y for xlib).
No there isn't. For your example, there is wmp
which can do that. For any other "data", there should aleardy be a tool in wmutils that does so.
In other hand, if wew stands for 'window events watcher' it wouldn't be logical to put such outputs to this one. Or is there any way to get such data using inside a bash script having the wews 'ev' output?
wew stands for window event watcher, and that is exactly what it does: print an event that occured along with the window associated with it. No more data is desirable, or expected. This tool should remain as simple as possible.
Do not judge me too hard, I am doing this for educational purposes.
I'm not judging anyone. Doing this for educational purposes don't prevent from doing some researches about the existing other tools, and the wmutils ecosystem.
Hello. I try to watch mouse pointer events using wew, although I recieve incorrect, I believe, data from wew programm. For example, if I try
wew -m XCB_EVENT_MASK_KEY_PRESS
wew does not return anything at all on key press but it returns fsts on creating a client(wid is random here just for an example): 16:0xasd23234 19:0xasd23234 the same goes for XCB_EVENT_MASK_BUTTON_MOTION, I havent tested the other event masks.