Skip to content
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

Spawn with a custom window rule #915

Open
YaLTeR opened this issue Jan 1, 2025 · 0 comments
Open

Spawn with a custom window rule #915

YaLTeR opened this issue Jan 1, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@YaLTeR
Copy link
Owner

YaLTeR commented Jan 1, 2025

Add a custom window rule argument to niri msg action spawn that applies properties to the first window created by the spawned process. For example, to spawn just one application window as floating, or at specific coordinates.

niri msg action spawn --rule 'open-floating true; default-floating-position x=100 y=100' -- foot

One question is how to represent this in the IPC structures. It would make sense to accept the same KDL as in the config for niri msg action spawn. However, it would also make sense to write out the window rule properties inside IPC structures, and pass them along with the rest of the action as JSON. And on the contrary, I don't like the idea of having a rule: String in IPC which is then parsed as KDL inside the niri server process.

So maybe we could put the window rule properties into the IPC structures and parse the config KDL in the client niri msg process? This unfortunately results in some duplication of window rule structures between the config and the IPC, but I guess that's not too bad.

@YaLTeR YaLTeR added the enhancement New feature or request label Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant