Session manager for Niri that automatically saves and restores your window layout.
- 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
{
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" ];
}cargo install --path .
# Run as systemd user service or manually
nirinit --save-interval 300The 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"]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.
MPL-2.0