Skip to content

Conversation

@meck
Copy link

@meck meck commented May 14, 2025

This is mostly adapted from the equivelent nixpgks hyprland option.

USWM gives better options for delaying start of dependent systemd units (waybar and such). And handles
putting processes in slices.

This is mostly adapted from the equivelent nixpgks hyprland option
Comment on lines +473 to +477
binPath = nixpkgs.lib.getExe (
pkgs.writeShellScriptBin "niriSession" ''
exec /run/current-system/sw/bin/niri --session
''
);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I have in my config, not sure if this is intended behavior or not, but it does work and would simplify this a bit:

Suggested change
binPath = nixpkgs.lib.getExe (
pkgs.writeShellScriptBin "niriSession" ''
exec /run/current-system/sw/bin/niri --session
''
);
binPath = "/run/current-system/sw/bin/niri -- --session";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised this works, since the -- should come before the compositor command and args1.

Footnotes

  1. https://github.com/Vladimir-csp/uwsm?tab=readme-ov-file#syntax-and-behavior

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems uwsm parses
uwsm start -S -F /run/current-system/sw/bin/niri -- --session and
uwsm start -S -F -- /run/current-system/sw/bin/niri --session
the same way, I guess it could be changed but it doesn't feel like a behavior that should be relied on.

i guess the best would be to add programs.uwsm.waylandCompositors.*.args in nixpkgs

@Brisingr05
Copy link

handles putting processes in slices.

FYI niri started using niri-session already does this for programs started using spawn-at-startup in the config, niri keybinds, or niri msg action spawn, but yes, UWSM definitely gives more flexibility.

flake.nix Outdated
Comment on lines 469 to 470
prettyName = "Niri";
comment = "Niri compositor managed by UWSM";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
prettyName = "Niri";
comment = "Niri compositor managed by UWSM";
prettyName = "niri";
comment = "niri compositor managed by UWSM";

Small nitpick but the "n" isn't meant to be capitalized according to the niri dev.

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.

3 participants