Configuration added to $XDG_CONFIG_HOME/niri/config.kdl. See https://yalter.github.io/niri/Configuration%3A-Introduction.html for the full list of options.
Declarations
Type
attribute set of (KDL value)Default
{ }Example
{
# str/num/bool → single argument
screenshot-path = "~/Screenshots/%Y-%m-%d %H-%M-%S.png";
layout.gaps = 8;
layout.shadow.draw-behind-window = true;
# {} → leaf node
prefer-no-csd = {};
input.touchpad.tap = {};
# _props → named properties: offset x=0 y=5
layout.shadow.offset._props = { x = 0; y = 5; };
# _children → ordered/repeated children
layout.preset-column-widths._children = [
{ proportion = 0.33333; }
{ proportion = 0.5; }
];
# _props + list args in binds
binds = {
"Mod+H".focus-column-left = {};
"Mod+Return" = {
_props.hotkey-overlay-title = "Open a Terminal";
spawn = ["ghostty"];
};
"XF86AudioRaiseVolume" = {
_props.allow-when-locked = true;
spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%+"];
};
};
# _args for repeated/parameterized top-level nodes
_children = [
{ workspace._args = ["chat"]; }
{ workspace._args = ["dev"]; }
# _args + children
{ output = { _args = ["eDP-1"]; scale = 2.0; }; }
# nested _children + _props
{
window-rule._children = [
{ match._props = { app-id = "firefox"; at-startup = true; }; }
{ open-on-workspace = "dev"; }
];
}
];
}