river icon indicating copy to clipboard operation
river copied to clipboard

unique identifer for each view?

Open Leon-Plickat opened this issue 4 years ago • 2 comments

I am contemplating whether it makes sense to give views a unique identifier.

Our goal is scripting via Wayland protocol extensions. Currently clients can only use the foreign toplevel handle to uniquely identify views, so every script/program that deals with views can only have a single Wayland connection.

This excludes all shell languages, which otherwise are commonly used for scripting. Users might expect to create a simple window-switcher with something like lswt | some-menu | riverctl focus-window (which I think is reasonable). That will obviously not be reliable and break as soon as there are multiple views with the same app-id and title (which is not uncommon). This usecase would be supported if views had unique identifiers.

Obviously for frame perfect scripting it is still necessary to keep it all to a single Wayland connection. But for use cases like the already mentioned window-switcher frame perfection is not relevant.

My idea is to simply add a unique_identifier event to the river-toplevel protocol. River would only assign views the id and advertise it, but not actually support any actions on the id. It would be the responsibility of clients to match the id to a foreign toplevel handle.

@ifreund thoughts?

Leon-Plickat avatar Sep 09 '21 15:09 Leon-Plickat

Any update ?

lidgnulinux avatar Sep 12 '22 04:09 lidgnulinux

I did not have the time and energy to work on this yet.

If you want this feature, you'll need to do it yourself. It should be fairly straightforward.

Leon-Plickat avatar Sep 12 '22 06:09 Leon-Plickat