Hyprland: Difference between revisions

m Display Manager Support: Gdm does not crash
Started updating the wiki for Hyprland 0.55 and the replacement of hyprlang.
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
<translate>
<translate>
[https://hyprland.org/ Hyprland] is an independent, extensible, bleeding-edge [[Wayland]] compositor written in modern C++ with an emphasis on looks. In addition, Hyprland also offers a number of first-party tools as well as a custom plugin system. The most up-to-date and complete documentation may be found on the project's own [https://wiki.hyprland.org/ wiki].  
{{outdated|date=may 2026|reason=[https://hypr.land/news/update55/ v0.55] introduced and recommends [[Lua]] for configuration. The [https://wiki.hypr.land upstream wiki] has already migrated and support for {{ic|hyprland.conf}} will be removed in a future release. Home manager support is [https://github.com/nix-community/home-manager/pull/9307 in progress.]|Talk:Hyprland#Lua}}
 
[https://hypr.land/ Hyprland] is an independent, extensible, bleeding-edge [[Wayland]] compositor written in modern C++ with an emphasis on looks. In addition, Hyprland also offers a number of first-party tools as well as a custom plugin system. The most up-to-date and complete documentation may be found on the project's own [https://wiki.hypr.land/ wiki].  


Some of the most notable features of Hyprland are:
Some of the most notable features of Hyprland are:
Line 31: Line 33:
Firstly, enable [https://wiki.nixos.org/wiki/Flakes#Other_Distros,_without_Home-Manager flakes] in your Nix installation. Then install Hyprland through <code>nix profile</code>:
Firstly, enable [https://wiki.nixos.org/wiki/Flakes#Other_Distros,_without_Home-Manager flakes] in your Nix installation. Then install Hyprland through <code>nix profile</code>:


<syntaxHighlight lang=text>
<syntaxHighlight lang=console>
nix profile install nixpkgs#hyprland
$ nix profile install nixpkgs#hyprland
</syntaxHighlight>
</syntaxHighlight>


In order for Hyprland to find graphics drivers on a non-NixOS system, you will need to install [[nixGL]]:
In order for Hyprland to find graphics drivers on a non-NixOS system, you will need to install [[nixGL]]:


<syntaxHighlight lang=text>
<syntaxHighlight lang=console>
nix profile install github:guibou/nixGL --impure
$ nix profile install github:nix-community/nixGL --impure
</syntaxHighlight>
</syntaxHighlight>


Now you can run Hyprland by invoking it with NixGL:
Now you can run Hyprland by invoking it with NixGL:


<syntaxHighlight lang=text>
<syntaxHighlight lang=console>
nixGL Hyprland
$ nixGL Hyprland
</syntaxHighlight>
</syntaxHighlight>


Line 56: Line 58:
* '''hyprpolkitagent''': Polkit authentication agent written in QT/QML.
* '''hyprpolkitagent''': Polkit authentication agent written in QT/QML.


All official Hypr* programs are listed in the project's [https://wiki.hyprland.org/Hypr-Ecosystem/ wiki page] along with documentation.
All official Hypr* programs are listed in the project's [https://wiki.hypr.land/Hypr-Ecosystem/ wiki page] along with documentation.


=== Hyprland Flake ===
=== Hyprland Flake ===
{{Warning|Installing Hyprland through a Nix flake will require the system to recompile Hyprland and all of its dependencies each time it updates. To avoid this, setup [[Hyprland#Cachix|Hyprland's Cachix settings]] before adding Hyprland as a flake input.}}
{{Warning|Installing Hyprland through a Nix flake will require the system to recompile Hyprland and all of its dependencies each time it updates. To avoid this, setup [[#Cachix|Hyprland's Cachix settings]] before adding Hyprland as a flake input.}}


If you wish to run a development version of Hyprland, you can easily do so by adding its flake to your flake inputs as demonstrated below:
If you wish to run a development version of Hyprland, you can easily do so by adding its flake to your flake inputs as demonstrated below:
Line 132: Line 134:


=== Display Manager Support ===
=== Display Manager Support ===
By default, Hyprland does not come with a [https://wiki.nixos.org/wiki/Wayland#Display_Managers display manager] and does not advertise support for one. Though one can start hyprland directly from tty with <code>Hyprland</code> or with <code>uwsm start select</code>, some display managers packaged in NixOS are compatible including but may not be limited to:
By default, Hyprland does not come with a [https://wiki.nixos.org/wiki/Wayland#Display_Managers display manager] and does not advertise support for one. Though one can start hyprland directly from tty with <code>start-hyprland</code> or with <code>uwsm start select</code>, some display managers packaged in NixOS are compatible including but may not be limited to:
* [[SDDM]]
* [[SDDM]]
* [[GDM]]  
* [[GDM]]  
* [[Greetd]] (especially with ReGreet)
* [[Greetd]] (especially with ReGreet)
* [[Ly]] (not recommended but works)
* [https://codeberg.org/fairyglade/ly Ly] (not recommended, but works)


== Configuration ==
== Configuration ==
On first run, Hyprland will create a configuration file with autogenerated defauts in <code>$XDG_CONFIG_HOME/hypr/hyprland.conf</code> if it does not exist. An example configuration can be found in the [https://github.com/hyprwm/Hyprland/blob/main/example/hyprland.conf project's git repository].
On first run, Hyprland will create a configuration file with autogenerated defauts in <code>$XDG_CONFIG_HOME/hypr/hyprland.lua</code> if it does not exist. An example configuration can be found in the [https://github.com/hyprwm/Hyprland/blob/v0.55.2-b/example/hyprland.lua project's git repository].


=== Using [[Home Manager]] ===
=== Using [[Home Manager]] ===
Home Manager allows for declarative configuration of Hyprland using Nix syntax. Entries with the same key should be written as lists. Variables’ and colors’ names should be quoted.  
Home Manager allows for declarative configuration of Hyprland using Nix syntax. Entries with the same key should be written as lists. Variables’ and colors’ names should be quoted.  


Find additional options under [https://home-manager.dev/manual/23.11/options.xhtml#opt-wayland.windowManager.hyprland.enable Home Manager - wayland.windowManager.hyprland]. Also, see the [https://wiki.hypr.land/Nix/Hyprland-on-Home-Manager/ Hyprland Page for Home Manager] for more examples.
Find additional options under [https://nix-community.github.io/home-manager/options.xhtml#opt-wayland.windowManager.hyprland.enable Home Manager - wayland.windowManager.hyprland]. Also, see the [https://wiki.hypr.land/Nix/Hyprland-on-Home-Manager/ Hyprland Page for Home Manager] for more examples.


{{File|3=wayland.windowManager.hyprland = {
{{File|3=wayland.windowManager.hyprland = {
Line 178: Line 180:
   };
   };
};|name=/etc/nixos/home.nix|lang=nix}}
};|name=/etc/nixos/home.nix|lang=nix}}
=== Using symlinks and Home Manager ===
{{File|3=xdg.configFile."hypr" = {
    source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/hypr";
    force = true;
    recursive = true;
};|name=home.nix|lang=nix}}
This will create a symlink between ~/.config/hypr and your nixos config location.


== Plugin Support ==
== Plugin Support ==
Line 282: Line 292:


== See also ==
== See also ==
* [https://hyprland.org/ Hyprland Website]
* [https://hypr.land/ Hyprland Website]
* [https://wiki.hyprland.org/ The official documentation]
* [https://wiki.hypr.land/ The official documentation]
* [https://github.com/hyprwm/Hyprland/ Hyprland Github Page]
* [https://github.com/hyprwm/Hyprland/ Hyprland Github Page]
* [https://github.com/hyprland-community/awesome-hyprland Community-maintained list of tools, plugins and extensions]
* [https://github.com/hyprland-community/awesome-hyprland Community-maintained list of tools, plugins and extensions]