river icon indicating copy to clipboard operation
river copied to clipboard

[feature request] Event mappings (hooks)

Open minego opened this issue 3 years ago • 2 comments

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.

minego avatar Aug 05 '21 19:08 minego

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.

Leon-Plickat avatar Aug 05 '21 20:08 Leon-Plickat

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.

Leon-Plickat avatar Aug 05 '21 20:08 Leon-Plickat