-
Notifications
You must be signed in to change notification settings - Fork 39
Support to explicitly set layer shell namespace #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This is useful for compositors such as niri, which can match on the layer shell namespace to put the background either behind the overview or set it as the normal desktop backdrop.
fec6d4a to
d9fb789
Compare
|
Hm, this isn't supposed to be configurable… |
|
FWIW niri is using namespace because there isn't really anything else to match on for layer surfaces. The protocol says:
From my reading, it makes sense for this to be settable in this way: you have one swaybg with the purpose of being a workspace background, and another for the purpose of being a backdrop background. There's also existing precedent: fuzzel added an argument for setting the namespace: https://codeberg.org/dnkl/fuzzel/commit/5255c0a3439b161a6fd24b1fc57cf4d848fdd3a0 Here the idea is that fuzzel can be used as a password picker, then niri can match it by a custom namespace and block it out from screencast. But fuzzel as an application launcher is fine to show. |
|
swaybg is always supposed to be a wallpaper program. It's never supposed to be anything else. |
|
Sorry, but I don't believe namespace is a fitting property. Namespace is intended to be fixed per app, not to be user-configurable. You're looking for a way to tag surfaces with a custom user-provided string. Namespace is not that. |
|
But namespace is an application defined string. The protocol states "Clients can specify a namespace that defines the purpose of the layer surface." and for niri a purpose i.e. "wallpaper-overview" makes sense to define the wallpaper for the overview. Forking swaybg, renaming it into I can understand why you think that namespace is a misuse from the original intention, since I guess that the original intention was to provide a somewhat generic namespace identifier for applications (i.e. "wallpaper", "panel", "notifications", …) and a string was chosen to not have to operate with the constrains of a fixed enum which requires protocol revisions to update. But I don't think niris usage of the identifier is wrong here and taking a cursory look at the namespace usage in sway its currently only used for logging output. Do we extend the namespace notion? Have swaybg default to |
Using a fork of swaybg for swaywm/swaybg#87. Using a fork of niri-flake with some additional configurations merged.

This is useful for compositors such as niri, which can match on the layer shell namespace to put the background either behind the overview or set it as the normal desktop backdrop.