Hyprland: Difference between revisions

Normalcea (talk | contribs)
Troubleshooting: Add section for electron applications to use a wayland backend instead of x11.
Hannses (talk | contribs)
screensharing
 
(10 intermediate revisions by 3 users not shown)
Line 10: Line 10:


== Installation ==
== Installation ==
=== NixOS 24.11 and Onwards ===
NixOS 24.11 added support for launching Hyprland with [https://github.com/Vladimir-csp/uwsm Universal Wayland Session Manager] (UWSM) and is the recommended way to launch Hyprland as it neatly integrates with [[Systemd]].
NixOS 24.11 added support for launching Hyprland with [https://github.com/Vladimir-csp/uwsm Universal Wayland Session Manager] and is the recommended way to launch Hyprland as it neatly integrates with [[Systemd]].


{{file|configuration.nix|nix|<nowiki>
{{file|configuration.nix|nix|<nowiki>
Line 18: Line 17:
     enable = true;
     enable = true;
     withUWSM = true; # recommended for most users
     withUWSM = true; # recommended for most users
    xwayland.enable = true; # Xwayland can be disabled.
  };
}
</nowiki>}}
=== NixOS 24.05 and Below ===
{{file|configuration.nix|nix|<nowiki>
{
  programs.hyprland = {
    enable = true;
     xwayland.enable = true; # Xwayland can be disabled.
     xwayland.enable = true; # Xwayland can be disabled.
   };
   };
Line 100: Line 88:
</nowiki>}}
</nowiki>}}


If you experience performance drops in video games or graphics tools like Blender on stable NixOS, then it's likely a [[Mesa]] version mismatch with Hyprland and the rest of your system. This can be fixed by substituting the system's mesa package with Hyprland's own.
If you experience performance drops in video games or graphics tools like Blender on stable NixOS, then it's likely a [[Mesa]] version mismatch with Hyprland and the rest of your system. This can be fixed by substituting the system's mesa package with Hyprland's own. '''Note that the''' <code>hardware.opengl</code> '''option only exists 24.05 and below'''. 


{{file|configuration.nix|nix|<nowiki>
{{file|configuration.nix|nix|<nowiki>
Line 127: Line 115:
}
}
</nowiki>}}
</nowiki>}}
=== Screensharing ===
{{file|configuration.nix|nix|<nowiki>
{
  xdg.portal = {
    enable = true;
    extraPortals = with pkgs; [ xdg-desktop-portal-hyprland ];
  };
}
</nowiki>}}


=== Display Manager Support ===
=== Display Manager Support ===
Line 209: Line 208:


[https://github.com/hyprland-community/awesome-hyprland#plugins List of plugins]
[https://github.com/hyprland-community/awesome-hyprland#plugins List of plugins]
== Troubleshooting ==
== Troubleshooting ==
=== Swaylock ===
=== Swaylock ===
Line 226: Line 222:
}
}
</nowiki>}}
</nowiki>}}
=== Theme Support ===
To make themes consistent in Hyprland, you can either use Home Manager like this:
{{file|/etc/nixos/home.nix or ~/.config/home-manager/home.nix|nix|<nowiki>
{
  home.pointerCursor = {
    gtk.enable = true;
    # x11.enable = true;
    package = pkgs.bibata-cursors;
    name = "Bibata-Modern-Classic";
    size = 16;
  };
  gtk = {
    enable = true;
    theme = {
      package = pkgs.flat-remix-gtk;
      name = "Flat-Remix-GTK-Grey-Darkest";
    };
    iconTheme = {
      package = pkgs.adwaita-icon-theme;
      name = "Adwaita";
    };
    font = {
      name = "Sans";
      size = 11;
    };
  };
}
</nowiki>}}
or set themes using dconf in your Hyprland configuration file:
{{file|hyprland.conf|conf|<nowiki>
exec-once = dconf write /org/gnome/desktop/interface/gtk-theme "'Adwaita'"
exec-once = dconf write /org/gnome/desktop/interface/icon-theme "'Flat-Remix-Red-Dark'"
exec-once = dconf write /org/gnome/desktop/interface/document-font-name "'Noto Sans Medium 11'"
exec-once = dconf write /org/gnome/desktop/interface/font-name "'Noto Sans Medium 11'"
exec-once = dconf write /org/gnome/desktop/interface/monospace-font-name "'Noto Sans Mono Medium 11'"
</nowiki>}}You may also install graphical tools such as gnome tweaks or nwg-look to set the themes manually.


== See also ==
== See also ==