Skip to content

Allow running multiple instances with different surface namespaces#163

Open
jazzpi wants to merge 2 commits intodanyspin97:mainfrom
jazzpi:namespace-option
Open

Allow running multiple instances with different surface namespaces#163
jazzpi wants to merge 2 commits intodanyspin97:mainfrom
jazzpi:namespace-option

Conversation

@jazzpi
Copy link
Copy Markdown
Contributor

@jazzpi jazzpi commented Jan 2, 2026

Add:

  • top-level layer_namespace config option for configuring the layer surface namespace
  • top-level socket_name config option for configuring the IPC socket name
  • corresponding -s/--socket-name CLI flag to wpaperctl

All 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.

@danyspin97
Copy link
Copy Markdown
Owner

Hi @jazzpi and thank you for your PR!

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.

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.

@danyspin97
Copy link
Copy Markdown
Owner

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 --instance flag instead of socket.

I will look more into the backdrop feature to see how wpaperd can support it.

@danyspin97
Copy link
Copy Markdown
Owner

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.

To understand correctly, the use case is showing a different wallpaper within Overview, instead of the one used as the display wallpaper, right?

@jazzpi
Copy link
Copy Markdown
Contributor Author

jazzpi commented Feb 3, 2026

Do you think is there any way to support that within a single wpaperd instance?

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.

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 --instance flag instead of socket.

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.

To understand correctly, the use case is showing a different wallpaper within Overview, instead of the one used as the display wallpaper, right?

Yes, exactly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants