Hyprland: Difference between revisions
imported>Niahex m Clarification of requires / add links to list of modules |
imported>Niahex wrong indicate files | Flake | Plugin | separe configuration in a title | add see also link |
||
| Line 15: | Line 15: | ||
=== Using [[NixOS]] === | === Using [[NixOS]] === | ||
{{file|/etc/nixos/ | {{file|/etc/nixos/configuration.nix|nix|<nowiki> | ||
{pkgs, ...}: | {pkgs, ...}: | ||
{ | { | ||
| Line 28: | Line 28: | ||
enableNvidiaPatches = true; | enableNvidiaPatches = true; | ||
}; | }; | ||
# ... | |||
} | } | ||
</nowiki>}} | </nowiki>}} | ||
| Line 34: | Line 35: | ||
=== Using [[Home Manager]] === | === Using [[Home Manager]] === | ||
{{file|/etc/nixos/ | {{file|/etc/nixos/home.nix or ~/.config/home-manager/home.nix|nix|<nowiki> | ||
{config, pkgs, ... }: | {config, pkgs, ... }: | ||
{ | { | ||
| Line 50: | Line 51: | ||
# Whether to enable patching wlroots for better Nvidia support | # Whether to enable patching wlroots for better Nvidia support | ||
enableNvidiaPatches = true; | enableNvidiaPatches = true; | ||
}; | |||
# ... | |||
} | |||
</nowiki>}} | |||
[https://mipmip.github.io/home-manager-option-search/?query=hyprland See all modules for Home Manager] | |||
=== Using [[Flake]] === | |||
== Configuration == | |||
=== Using [[Home Manager]] === | |||
You have two options for configuring the settings: | |||
1. Compose the configuration using Nix syntax: | |||
{{file|/etc/nixos/home.nix or ~/.config/home-manager/home.nix|nix|<nowiki> | |||
{config, pkgs, ... }: | |||
{ | |||
wayland.windowManager.hyprland.settings = { | |||
decoration = { | |||
shadow_offset = "0 5"; | |||
"col.shadow" = "rgba(00000099)"; | |||
}; | |||
"$mod" = "SUPER"; | |||
bindm = [ | |||
# mouse movements | |||
"$mod, mouse:272, movewindow" | |||
"$mod, mouse:273, resizewindow" | |||
"$mod ALT, mouse:272, resizewindow" | |||
]; | ]; | ||
}; | |||
# ... | |||
} | |||
</nowiki>}} | |||
2. You can also use Hyprland's syntax to write the file like this: : | |||
{{file|/etc/nixos/home.nix or ~/.config/home-manager/home.nix|nix|<nowiki> | |||
{config, pkgs, ... }: | |||
{ | |||
home.file."~/.config/hypr/hyprland.conf".text = '' | |||
decoration { | |||
shadow_offset = 0 5 | |||
col.shadow = rgba(00000099) | |||
} | |||
$mod = SUPER | |||
bindm = $mod, mouse:272, movewindow | |||
bindm = $mod, mouse:273, resizewindow | |||
bindm = $mod ALT, mouse:272, resizewindow | |||
''; | |||
# ... | |||
} | |||
</nowiki>}} | |||
== Plugin == | |||
You need use flake for her, example: | |||
put this in your flake.nix | |||
{{file|/etc/nixos/flake.nix or ~/.config/home-manager/flake.nix|nix|<nowiki> | |||
{ | |||
inputs = { | |||
# ... | |||
hyprland.url = "github:hyprwm/Hyprland"; | |||
plugin_name = { | |||
url = "github:maintener/plugin_name"; | |||
inputs.hyprland.follows = "hyprland"; # IMPORTANT | |||
}; | }; | ||
}; | }; | ||
} | } | ||
</nowiki>}} | </nowiki>}} | ||
then, inside your home-manager module: | |||
{{file|/etc/nixos/flake.nix or ~/.config/home-manager/flake.nix|nix|<nowiki> | |||
{ | |||
wayland.windowManager.hyprland = { | |||
plugins = [ | |||
inputs.plugin_name.packages.${pkgs.system}.default | |||
]; | |||
}; | |||
} | |||
</nowiki>}} | |||
[https://github.com/hyprland-community/awesome-hyprland#plugins List of plugins] | |||
== Usage == | |||
== Troubleshooting == | == Troubleshooting == | ||
== See also == | |||
* [https://hyprland.org/ Hyprland Website] | |||
* [https://wiki.hyprland.org/ The official documentation] | |||
* [https://github.com/hyprwm/Hyprland/ Hyprland Github Page] | |||
* [https://github.com/hyprland-community/awesome-hyprland Community-maintained list of tools, plugins and extensions] | |||
[[Category:Window managers]] | [[Category:Window managers]] | ||
[[Category:Applications]] | [[Category:Applications]] | ||