Allow running multiple instances with different surface namespaces#163
Allow running multiple instances with different surface namespaces#163jazzpi wants to merge 2 commits intodanyspin97:mainfrom
Conversation
|
Hi @jazzpi and thank you for your PR!
That's a new usecase for me and it looks very cool. Do you think is there any way to support that within a single wpaperd instance? I am still going to accept this PR because it might be useful, but I am open to have support for this use case out of the box. |
|
The two instances of wpaperd would have the same config/state/logs directories, with the exception of the socket. I think this could cause issues, like lost logs from one instance and wallpaper symlinks not working. I would use a different prefix name for all instances of xdg_dirs instead, so that would work as well. Maybe use a I will look more into the backdrop feature to see how wpaperd can support it. |
To understand correctly, the use case is showing a different wallpaper within Overview, instead of the one used as the display wallpaper, right? |
Yes I think that should be possible, you'd just need to create two layer surfaces with different namespaces. I just went with two instances because it was pretty easy to figure out what to modify for that.
You have to point them to different config directories anyways, otherwise they would run under the same namespace as well. But yes the state/logs is a good point. Creating both surfaces in the same instance would be a much cleaner solution.
Yes, exactly. |
Add:
layer_namespaceconfig option for configuring the layer surface namespacesocket_nameconfig option for configuring the IPC socket name-s/--socket-nameCLI flag towpaperctlAll of the above default to
wpaperd, so there should be no change in behavior if the options are not specified.My usecase for this is showing a wallpaper in the Niri overview backdrop. That requires two instances of wpaperd, with different layer surface namespaces so I can match on that.