river
river copied to clipboard
[feature request] Event mappings (hooks)
I would really like the ability to map an action to be performed based on events, such as a new window being opened or switching focus to a new window.
My goal is to be able to configure a script that should be run when the currently active window changes, which could then change some settings based on the currently active application.
This would likely also require a command to ask river what the active application is. My goal is to get xkeysnail like functionality by running a command when an application is selected to set a keyboard layout so that I can have application specific keyboard layouts.
See also #52.
Generally the problem with hooks is frame perfection. While that isn't a thing on X, on Wayland we take it seriously.
This would likely also require a command to ask river what the active application is.
The title of the focused application can be fetched with the river-status protocol extension. In the future we may want to link a foreign toplevel handle instead.