1kanshi(5)                     File Formats Manual                    kanshi(5)
2
3
4

NAME

6       kanshi - configuration file
7

DESCRIPTION

9       A kanshi configuration file is a list of profiles. Each profile has an
10       optional name and contains profile directives delimited by brackets ({
11       and }).
12
13       Example:
14
15           include /etc/kanshi/config.d/*
16
17           profile {
18                output LVDS-1 disable
19                output "Some Company ASDF 4242" mode 1600x900 position 0,0
20           }
21
22           profile nomad {
23                output LVDS-1 enable scale 2
24           }
25

DIRECTIVES

27       profile [<name>] { <profile directives...> }
28           Defines a new profile using the specified bracket-delimited profile
29           directives. A name can be specified but is optional.
30
31       include <path>
32           Include as another file from path. Expands shell syntax (see word‐
33           exp(3) for details).
34

PROFILE DIRECTIVES

36       Profile directives are followed by space-separated arguments. Arguments
37       can be quoted (with ") if they contain spaces.
38
39       output <criteria> <output-command...>
40           An output directive adds an output to the profile. The criteria can
41           either be an output name, an output description or "*". The latter
42           can be used to match any output.
43
44           On sway(1), output names and descriptions can be obtained via
45           swaymsg -t get_outputs.
46
47       exec <command>
48           An exec directive executes a command when the profile was success‐
49           fully applied. This can be used to update the compositor state to
50           the profile when not done automatically.
51
52           Commands are executed asynchronously and their order may not be
53           preserved. If you need to execute sequential commands, you should
54           collect in one exec statement or in a separate script.
55
56           On sway(1) for example, exec can be used to move workspaces to the
57           right output:
58
59               profile multihead {
60                    output eDP-1 enable
61                    output DP-1 enable transform 270
62                    exec swaymsg workspace 1, move workspace to eDP-1
63               }
64
65           Note that some extra care must be taken with outputs identified by
66           an output description as the real name may change:
67
68               profile complex {
69                    output "Some Other Company GTBZ 2525" mode 1920x1200
70                    exec swaymsg workspace 1, move workspace to output '"Some Other Company GTBZ 2525"'
71               }
72

OUTPUT DIRECTIVES

74       enable|disable
75           Enables or disables the specified output.
76
77       mode <width>x<height>[@<rate>[Hz]]
78           Configures the specified output to use the specified mode. Modes
79           are a combination of width and height (in pixels) and a refresh
80           rate (in Hz) that your display can be configured to use.
81
82           Examples:
83
84               output HDMI-A-1 mode 1920x1080
85               output HDMI-A-1 mode 1920x1080@60Hz
86
87       position <x>,<y>
88           Places the output at the specified position in the global coordi‐
89           nates space.
90
91           Example:
92
93               output HDMI-A-1 position 1600,0
94
95       scale <factor>
96           Scales the output by the specified scale factor.
97
98       transform <transform>
99           Sets the output transform. Can be one of "90", "180", "270" for a
100           rotation; or "flipped", "flipped-90", "flipped-180", "flipped-270"
101           for a rotation and a flip; or "normal" for no transform.
102
103       adaptive_sync on|off
104           Enables or disables adaptive synchronization (aka. Variable Refresh
105           Rate).
106

AUTHORS

108       Maintained by Simon Ser <contact@emersion.fr>, who is assisted by other
109       open-source contributors. For more information about kanshi develop‐
110       ment, see <https://git.sr.ht/~emersion/kanshi>.
111

SEE ALSO

113       kanshi(1)
114
115
116
117                                  2023-07-20                         kanshi(5)
Impressum