.\" Generated by scdoc 1.11.3 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "kanshi" "5" "2025-10-06" .PP .SH NAME .PP kanshi - configuration file .PP .SH DESCRIPTION .PP A kanshi configuration file is a list of profiles.\& Each profile has an optional name and contains profile directives delimited by brackets (\fB{\fR and \fB}\fR).\& .PP Example: .PP .nf .RS 4 include /etc/kanshi/config\&.d/* profile { output LVDS-1 disable output "Some Company ASDF 4242" { mode 1600x900 position 0,0 } } profile nomad { output LVDS-1 enable scale 2 } .fi .RE .PP .SH DIRECTIVES .PP \fBprofile\fR [] { } .RS 4 Defines a new profile using the specified bracket-delimited profile directives.\& A name can be specified but is optional.\& .PP .RE \fBoutput\fR .RS 4 Defines defaults for output directives inside profile definitions.\& .PP These defaults only apply when the respective output is mentioned in a specific profile.\& For example, the following two profiles are equivalent: .PP .nf .RS 4 output eDP-1 scale 2 profile manual { output eDP-1 scale 2 } profile uses-defaults { output eDP-1 } .fi .RE .PP Output directives may be specified in a bracket-delimited block as well.\& .PP .RE \fBinclude\fR .RS 4 Include as another file from \fIpath\fR.\& Expands shell syntax (see \fBwordexp\fR(3) for details).\& .PP .RE .SH PROFILE DIRECTIVES .PP Profile directives are followed by space-separated arguments.\& Arguments can be quoted (with \fB"\fR) if they contain spaces.\& .PP \fBoutput\fR .RS 4 An output directive adds an output to the profile.\& .PP The criteria can be one of: .PP .PD 0 .IP \(bu 4 An output name (e.\&g.\& "DP-1").\& Note, output names may not be stable: they may change across reboots (depending on kernel driver probe order) or creation order (typically for USB-C docks).\& .IP \(bu 4 A space-separated string containing the output manufacturer, model and serial number (e.\&g.\& "Foocorp ASDF 1234").\& A wildcard pattern can be used (e.\&g.\& "Foocorp ASDF *"), see \fBglob\fR(7).\& If one of these fields is missing, it needs to be populated with the string "Unknown" (e.\&g.\& "Foocorp ASDF Unknown").\& .IP \(bu 4 An output alias (e.\&g.\& "$work-desk3") defined by an output alias directive.\& Output aliases can only be used in profile scope.\& .IP \(bu 4 A wildcard "*", to match any output.\& Wildcards can only be used in profile scope and will only match one output.\& .PD .PP Output directives may be specified in a bracket-delimited block as well.\& .PP On \fBsway\fR(1), output names and identifiers can be obtained via "swaymsg -t get_outputs".\& .PP .RE \fBexec\fR .RS 4 An exec directive executes a command when the profile was successfully applied.\& This can be used to update the compositor state to the profile when not done automatically.\& .PP Commands are executed asynchronously and their order may not be preserved.\& If you need to execute sequential commands, you should collect in one exec statement or in a separate script.\& .PP On \fBsway\fR(1) for example, \fBexec\fR can be used to move workspaces to the right output: .PP .nf .RS 4 profile multihead { output eDP-1 enable output DP-1 enable transform 270 exec swaymsg workspace 1, move workspace to eDP-1 } .fi .RE .PP Note that some extra care must be taken with outputs identified by an output description as the real name may change: .PP .nf .RS 4 profile complex { output "Some Other Company GTBZ 2525" mode 1920x1200 exec swaymsg workspace 1, move workspace to output \&'"Some Other Company GTBZ 2525"\&' } .fi .RE .PP .RE .SH OUTPUT DIRECTIVES .PP \fBenable\fR|\fBdisable\fR .RS 4 Enables or disables the specified output.\& .PP .RE \fBmode\fR [--custom] x[@[Hz]] .RS 4 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.\& .PP Examples: .PP .nf .RS 4 output HDMI-A-1 mode 1920x1080 output HDMI-A-1 mode 1920x1080@60Hz output HDMI-A-1 mode --custom 1280x720@60Hz .fi .RE .PP .RE \fBposition\fR , .RS 4 Places the output at the specified position in the global coordinates space.\& .PP Example: .PP .nf .RS 4 output HDMI-A-1 position 1600,0 .fi .RE .PP .RE \fBscale\fR .RS 4 Scales the output by the specified scale factor.\& .PP .RE \fBtransform\fR .RS 4 Sets the output transform.\& Can be one of "90", "180", "270" for a rotation; or "flipped", "flipped-90", "flipped-180", "flipped-270" for a rotation and a flip; or "normal" for no transform.\& .PP .RE \fBadaptive_sync\fR on|off .RS 4 Enables or disables adaptive synchronization (aka.\& Variable Refresh Rate).\& .PP .RE \fBalias\fR $ .RS 4 Defines an alias for this output.\& Output aliases can only be defined in global scope.\& .PP .RE .SH AUTHORS .PP Maintained by Simon Ser , who is assisted by other open-source contributors.\& For more information about kanshi development, see .\& .PP .SH SEE ALSO .PP \fBkanshi\fR(1)