hl.config¶
- hl.config(config)¶
Set Hyprland configuration values from a nested Lua table.
hl.configwalks the table recursively. Nested keys are joined with dots, so{ general = { gaps_in = 5 } }setsgeneral.gaps_in. If a full dotted key exists, it is treated as the target config key; otherwise nested tables are traversed.
Signature¶
hl.config(config: table): nil
Parameters¶
- configtable
Nested configuration table. Leaf fields must correspond to valid
HL.ConfigKeyentries.
Returns¶
- nil
This function applies configuration and does not return a value.
Examples¶
Set common options using nested tables:
hl.config({
general = {
gaps_in = 5,
gaps_out = 12,
border_size = 2,
layout = "dwindle",
},
input = {
kb_layout = "us",
repeat_rate = 35,
repeat_delay = 250,
},
})
Set a deeply nested value:
hl.config({
decoration = {
blur = {
enabled = true,
size = 8,
passes = 2,
},
},
})
Use a dotted key directly:
hl.config({
["general.gaps_in"] = 5,
["decoration.blur.enabled"] = true,
})
Notes¶
Unknown keys are reported as configuration errors. During dynamic parsing, changing a value can schedule the appropriate Hyprland refresh.
See also¶
HL.ConfigKeyKnown configuration key names.
HL.ConfigValueTypesType mapping for known configuration values.
hl.get_config()Read a configuration value by key.