nirinit

Crates.ionirinit
lib.rsnirinit
version0.1.4
created_at2025-10-02 10:04:18.733227+00
updated_at2026-01-02 08:56:21.637712+00
descriptionA session manager for Niri, a scrollable-tiling Wayland compositor
homepage
repositoryhttps://github.com/amaanq/nirinit
max_upload_size
id1864127
size68,411
Amaan Qureshi (amaanq)

documentation

README

nirinit

Session manager for Niri that automatically saves and restores your window layout.

Features

  • Auto-saves session every 5 minutes (configurable)
  • Restores windows to their workspaces on startup
  • Preserves workspace names, indices, and outputs
  • Skip apps from being restored

Installation

NixOS + Home Manager

{
  inputs.nirinit = {
    url = "github:amaanq/nirinit";
    inputs.nixpkgs.follows = "nixpkgs";
  };

  # In your NixOS configuration:
  imports = [ nirinit.nixosModules.nirinit ];

  services.nirinit.enable = true;

  # In your Home Manager configuration:
  imports = [ nirinit.homeModules.nirinit ];

  services.nirinit.settings.skip.apps = [ "discord" "firefox" ];
}

Manual

cargo install --path .

# Run as systemd user service or manually
nirinit --save-interval 300

Configuration

The config file is located at : $XDG_CONFIG_HOME/nirinit/config.toml (for most users this would be ~/.config/nirinit/config.toml)

[skip]
apps = ["discord", "slack"]

Session file

The session file is located at $XDG_DATA_HOME/nirinit/session.json (again, for most users this would be ~/.local/share/nirinit/session.json)

Normally, you shouldn't need to touch this, but if you notice something odd happening when your session is being restored, deleting this file might help.

License

MPL-2.0

Commit count: 0

cargo fmt