dwm-ipc icon indicating copy to clipboard operation
dwm-ipc copied to clipboard

Creating your own events to subscribe to

Open Ingvix opened this issue 4 years ago • 0 comments

I tried to figure out how to implement a new event type that would provide information on one or maybe more setting variables that have come to be with functionalities I've implemented in my dwm build. However the system appeared more complex than I initially expected so I sort of gave up on it for now.

So I started wondering if it's would be possible to make some sort of helper function or otherwise make creating one's own events more approachable feat. I don't have a clear understanding of how the system works so I'm just shooting in the dark with the suggestion, but maybe something like allow the client to subscribe to an arbitrary event and in dwm's source code one could run some function like sendevent("arbitrary_event_name", "property_name", property_value) in places where it's relevant. Or create an array of predefined events to avoid the arbitrarity but allowing extending it and refer to the event name by index.

Might be that these are not doable with the current implementation but I'd be happy with anything that would make it at least possible and comprehensible to create my own event. Even a guide would be nice, if it's actually happened to be sensible but I just gave up too soon on working out how to do it.

Ingvix avatar Nov 21 '21 13:11 Ingvix