Niri: Difference between revisions

Malix (talk | contribs)
m Fix File language
 
(9 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{infobox application
{{infobox application
  |name=Niri
| name = Niri
  |type=Wayland compositor
| type = Wayland compositor
  |initialRelease=2023-11-26
| initialRelease = 2023-11-26
  |status=Active
| status = Active
  |license=GNU General Public License v3.0 only
| license = GNU General Public License v3.0 only
  |os=Linux, FreeBSD
| os = Linux, FreeBSD
  |programmingLanguage=Rust, GLSL
| programmingLanguage = Rust, GLSL
  |github=YaLTeR/niri
| github = YaLTeR/niri
  |documentation=[https://github.com/YaLTeR/niri/wiki Official wiki], [https://github.com/sodiboo/niri-flake/blob/main/docs.md niri-flake]
| documentation = [https://yalter.github.io/niri/ Official wiki], [https://github.com/sodiboo/niri-flake/blob/main/docs.md niri-flake]
| image = Niri-icon.svg
| bugTracker = https://github.com/YaLTeR/niri/issues
| latestRelease = 25.11; 29 Nov 2025
}}
}}


Line 23: Line 26:
{{Note|Niri can be enabled <strong>without installing a custom flake</strong> such as [https://github.com/sodiboo/niri-flake niri-flake]. {{ic|niri-flake}} is only necessary if you want to use a very recent version of Niri or if you want to write configurations in the Nix language, although as of 2025 this repository is listed near the top in search engines.}}
{{Note|Niri can be enabled <strong>without installing a custom flake</strong> such as [https://github.com/sodiboo/niri-flake niri-flake]. {{ic|niri-flake}} is only necessary if you want to use a very recent version of Niri or if you want to write configurations in the Nix language, although as of 2025 this repository is listed near the top in search engines.}}


{{Warning|Without [[#Configuration]] or [[#Additional Setup]], or in other words after fresh installation, you may unable to launch apps because of missing Alacricity and fuzzel. Press {{ic|Super + Shift + E}} to exit Niri and proceed to one of them.}}
{{Warning|Without [[#Configuration]] or [[#Additional Setup]], or in other words after fresh installation, you may be unable to launch apps because of missing Alacritty and fuzzel. Press <kbd>Super</kbd>+<kbd>Shift</kbd>+<kbd>E</kbd> to exit Niri and proceed to one of them.}}


== Configuration ==
== Configuration ==
Line 35: Line 38:
You might want to start from [https://github.com/YaLTeR/niri/blob/main/resources/default-config.kdl the default configuration file] described at [https://github.com/YaLTeR/niri/wiki/Getting-Started#main-default-hotkeys].
You might want to start from [https://github.com/YaLTeR/niri/blob/main/resources/default-config.kdl the default configuration file] described at [https://github.com/YaLTeR/niri/wiki/Getting-Started#main-default-hotkeys].


See [https://github.com/YaLTeR/niri/wiki the wiki] for configuration options for Niri.
See [https://yalter.github.io/niri/ the wiki] for configuration options for Niri.


== Additional Setup ==
== Additional Setup ==
Line 47: Line 50:


programs.waybar.enable = true; # top bar
programs.waybar.enable = true; # top bar
environment.systemPackages = with pkgs; [ alacritty fuzzel swaylock mako swayidle ]
environment.systemPackages = with pkgs; [ alacritty fuzzel swaylock mako swayidle ];
|name=/etc/nixos/configuration.nix|lang=nix}}Or using [[Home Manager]]:{{file|~/.config/home-manager/home.nix|nix|3=
|name=/etc/nixos/configuration.nix|lang=nix}}Or using [[Home Manager]]:{{file|~/.config/home-manager/home.nix|nix|3=
programs.alacritty.enable = true; # Super+T in the default setting (terminal)
programs.alacritty.enable = true; # Super+T in the default setting (terminal)
Line 82: Line 85:
   ];
   ];
});</nowiki>}}
});</nowiki>}}
=== XWayland apps not working ===
There is a optional dependency for Niri which is highly recommended to install (you can read [https://github.com/YaLTeR/niri/wiki/Xwayland this] article to learn more about this)
{{File|3=environment.systemPackages = with pkgs; [
    xwayland-satellite # xwayland support
];|name=/etc/nixos/configuration.nix|lang=nix}}
Or using [[Home Manager]]
{{File|3=home.packages = with pkgs; [
  xwayland-satellite # xwayland support
];|name=~/.config/home-manager/home.nix|lang=nix}}
After you installed {{ic|xwayland-satellite}} Niri will integrate it out of the box and all of your XWayland apps will function properly.
=== File picker not working ===
If you are using <code>xdg-desktop-portal-gnome</code>, it will attempt to use Nautilus as the file picker, which will fail if Nautilus is not installed.
To work around this problem, you can force usage of the gtk or kde portals for file picker instead:
{{File|3=xdg.portal.config.niri = {
  "org.freedesktop.impl.portal.FileChooser" = [ "gtk" ]; # or "kde"
};|name=/etc/nixos/configuration.nix|lang=nix}}


== See Also ==
== See Also ==