services.kanshi.enable
Whether to enable kanshi, a Wayland daemon that automatically configures outputs.
Type: boolean
Default:
false
Example:
true
Declared by:
services.kanshi.package
The kanshi package to use.
Type: package
Default:
pkgs.kanshi
Declared by:
services.kanshi.extraConfig
Extra configuration lines to append to the kanshi configuration file.
Type: strings concatenated with “\n”
Default:
""
Declared by:
services.kanshi.profiles
Attribute set of profiles.
Type: attribute set of (submodule)
Default:
{ }
Example:
{
docked = {
outputs = [
{
criteria = "eDP-1";
}
{
criteria = "Some Company ASDF 4242";
transform = "90";
}
];
};
undocked = {
outputs = [
{
criteria = "eDP-1";
}
];
};
}
Declared by:
services.kanshi.profiles.<name>.exec
Commands executed after the profile is successfully applied. Note that if you provide multiple commands, they will be executed asynchronously with no guaranteed ordering.
Type: (list of string) or string convertible to it
Default:
[ ]
Example:
"[ \${pkg.sway}/bin/swaymsg workspace 1, move workspace to eDP-1 ]"
Declared by:
services.kanshi.profiles.<name>.name
Profile name
Type: string
Default:
""
Declared by:
services.kanshi.profiles.<name>.outputs
Outputs configuration.
Type: list of (submodule)
Default:
[ ]
Declared by:
services.kanshi.profiles.<name>.outputs.*.adaptiveSync
Enables or disables adaptive synchronization (aka. Variable Refresh Rate).
Type: null or boolean
Default:
null
Example:
true
Declared by:
services.kanshi.profiles.<name>.outputs.*.alias
Defines an alias for the output
Type: null or string
Default:
null
Example:
"laptopMonitor"
Declared by:
services.kanshi.profiles.<name>.outputs.*.criteria
The criteria can either be an output name, an output description or “*”. The latter can be used to match any output.
On
sway(1),
output names and descriptions can be obtained via
swaymsg -t get_outputs.
Type: string
Declared by:
services.kanshi.profiles.<name>.outputs.*.mode
<width>x<height>[@<rate>[Hz]]
Configures the specified output to use the specified mode. Modes are a combination of width and height (in pixels) and a refresh rate (in Hz) that your display can be configured to use.
Type: null or string
Default:
null
Example:
"1920x1080@60Hz"
Declared by:
services.kanshi.profiles.<name>.outputs.*.position
<x>,<y>
Places the output at the specified position in the global coordinates space.
Type: null or string
Default:
null
Example:
"1600,0"
Declared by:
services.kanshi.profiles.<name>.outputs.*.scale
Scales the output by the specified scale factor.
Type: null or floating point number
Default:
null
Example:
2
Declared by:
services.kanshi.profiles.<name>.outputs.*.status
Enables or disables the specified output.
Type: null or one of “enable”, “disable”
Default:
null
Declared by:
services.kanshi.profiles.<name>.outputs.*.transform
Sets the output transform.
Type: null or one of “normal”, “90”, “180”, “270”, “flipped”, “flipped-90”, “flipped-180”, “flipped-270”
Default:
null
Declared by:
services.kanshi.settings
Ordered list of directives. See kanshi(5) for information.
Type: list of attribute-tagged union with choices: include, output, profile
Default:
[ ]
Example:
[
{ include = "path/to/included/files"; }
{ output.criteria = "eDP-1";
output.scale = 2;
}
{ profile.name = "undocked";
profile.outputs = [
{
criteria = "eDP-1";
}
];
}
{ profile.name = "docked";
profile.outputs = [
{
criteria = "eDP-1";
}
{
criteria = "Some Company ASDF 4242";
transform = "90";
}
];
}
]
Declared by:
services.kanshi.settings.*.include
Include as another file from path. Expands shell syntax (see wordexp(3) for details).
Type: string
Declared by:
services.kanshi.settings.*.output
output attribute set.
Type: submodule
Declared by:
services.kanshi.settings.*.output.adaptiveSync
Enables or disables adaptive synchronization (aka. Variable Refresh Rate).
Type: null or boolean
Default:
null
Example:
true
services.kanshi.settings.*.output.alias
Defines an alias for the output
Type: null or string
Default:
null
Example:
"laptopMonitor"
services.kanshi.settings.*.output.criteria
The criteria can either be an output name, an output description or “*”. The latter can be used to match any output.
On
sway(1),
output names and descriptions can be obtained via
swaymsg -t get_outputs.
Type: string
services.kanshi.settings.*.output.mode
<width>x<height>[@<rate>[Hz]]
Configures the specified output to use the specified mode. Modes are a combination of width and height (in pixels) and a refresh rate (in Hz) that your display can be configured to use.
Type: null or string
Default:
null
Example:
"1920x1080@60Hz"
services.kanshi.settings.*.output.position
<x>,<y>
Places the output at the specified position in the global coordinates space.
Type: null or string
Default:
null
Example:
"1600,0"
services.kanshi.settings.*.output.scale
Scales the output by the specified scale factor.
Type: null or floating point number
Default:
null
Example:
2
services.kanshi.settings.*.output.status
Enables or disables the specified output.
Type: null or one of “enable”, “disable”
Default:
null
services.kanshi.settings.*.output.transform
Sets the output transform.
Type: null or one of “normal”, “90”, “180”, “270”, “flipped”, “flipped-90”, “flipped-180”, “flipped-270”
Default:
null
services.kanshi.settings.*.profile
profile attribute set.
Type: submodule
Declared by:
services.kanshi.settings.*.profile.exec
Commands executed after the profile is successfully applied. Note that if you provide multiple commands, they will be executed asynchronously with no guaranteed ordering.
Type: (list of string) or string convertible to it
Default:
[ ]
Example:
"[ \${pkg.sway}/bin/swaymsg workspace 1, move workspace to eDP-1 ]"
services.kanshi.settings.*.profile.name
Profile name
Type: string
Default:
""
services.kanshi.settings.*.profile.outputs
Outputs configuration.
Type: list of (submodule)
Default:
[ ]
services.kanshi.settings.*.profile.outputs.*.adaptiveSync
Enables or disables adaptive synchronization (aka. Variable Refresh Rate).
Type: null or boolean
Default:
null
Example:
true
services.kanshi.settings.*.profile.outputs.*.alias
Defines an alias for the output
Type: null or string
Default:
null
Example:
"laptopMonitor"
services.kanshi.settings.*.profile.outputs.*.criteria
The criteria can either be an output name, an output description or “*”. The latter can be used to match any output.
On
sway(1),
output names and descriptions can be obtained via
swaymsg -t get_outputs.
Type: string
services.kanshi.settings.*.profile.outputs.*.mode
<width>x<height>[@<rate>[Hz]]
Configures the specified output to use the specified mode. Modes are a combination of width and height (in pixels) and a refresh rate (in Hz) that your display can be configured to use.
Type: null or string
Default:
null
Example:
"1920x1080@60Hz"
services.kanshi.settings.*.profile.outputs.*.position
<x>,<y>
Places the output at the specified position in the global coordinates space.
Type: null or string
Default:
null
Example:
"1600,0"
services.kanshi.settings.*.profile.outputs.*.scale
Scales the output by the specified scale factor.
Type: null or floating point number
Default:
null
Example:
2
services.kanshi.settings.*.profile.outputs.*.status
Enables or disables the specified output.
Type: null or one of “enable”, “disable”
Default:
null
services.kanshi.settings.*.profile.outputs.*.transform
Sets the output transform.
Type: null or one of “normal”, “90”, “180”, “270”, “flipped”, “flipped-90”, “flipped-180”, “flipped-270”
Default:
null
services.kanshi.systemdTarget
Systemd target to bind to.
Type: string
Default:
config.wayland.systemd.target
Declared by: