Hyprland configuration written in Nix. Entries with the same key should be written as lists. Variables' and colors' names should be quoted. See https://wiki.hypr.land for more examples.
When wayland.windowManager.hyprland.configType is "lua", each attribute maps to an hl.<name>(...) call. List values generate one call per element.
Attribute values with an _args list generate multi-argument calls. Attribute values with _var generate a Lua local variable instead of an hl.<name>(...) call. If no name is set, the attribute name is used as the Lua variable name. Values created with lib.generators.mkLuaInline are rendered as raw Lua expressions.
Declarations
Type
Hyprland configuration valueDefault
{ }Example
{
mod = {
_var = "SUPER";
};
config = {
general = {
gaps_in = 5;
gaps_out = 20;
border_size = 2;
};
decoration = {
rounding = 10;
};
};
bind = [
{
_args = [
(lib.generators.mkLuaInline "mod .. \" + Q\"")
(lib.generators.mkLuaInline "hl.dsp.window.close()")
{ locked = true; }
];
}
{
_args = [
"SUPER + RETURN"
(lib.generators.mkLuaInline "hl.dsp.exec_cmd(\"kitty\")")
];
}
{
_args = [
"ALT + R"
(lib.generators.mkLuaInline "hl.dsp.submap(\"resize\")")
];
}
];
define_submap = {
_args = [
"resize"
(lib.generators.mkLuaInline "function()\n hl.bind(\"right\", hl.dsp.window.resize({ x = 10, y = 0, relative = true }), { repeating = true })\n hl.bind(\"left\", hl.dsp.window.resize({ x = -10, y = 0, relative = true }), { repeating = true })\n hl.bind(\"escape\", hl.dsp.submap(\"reset\"))\nend")
];
};
window_rule = {
match.class = "kitty";
border_size = 2;
};
on = {
_args = [
"hyprland.start"
(lib.generators.mkLuaInline "function()\n hl.exec_cmd(\"waybar\")\nend")
];
};
}