1sway-output(5) File Formats Manual sway-output(5)
2
3
4
6 sway-output - output configuration commands for sway
7
9 You may combine output commands into one, like so:
10
11 output HDMI-A-1 mode 1920x1080 pos 1920 0 bg ~/wallpaper.png
12 stretch
13
14 You can get a list of output names with swaymsg -t get_outputs. You may
15 also match any output by using the output name "*". Additionally, "-"
16 can be used to match the focused output by name and "--" can be used to
17 match the focused output by its identifier.
18
19 Some outputs may have different names when disconnecting and reconnect‐
20 ing. To identify these, the name can be substituted for a string con‐
21 sisting of the make, model and serial which you can get from swaymsg -t
22 get_outputs. Each value must be separated by one space. For example:
23
24 output "Some Company ABC123 0x00000000" pos 1920 0
25
27 output <name> mode|resolution|res [--custom] <WIDTHx‐
28 HEIGHT>[@<RATE>[Hz]]
29 Configures the specified output to use the given mode. Modes are a
30 combination of width and height (in pixels) and a refresh rate that
31 your display can be configured to use. For a list of available
32 modes for each output, use swaymsg -t get_outputs.
33
34 To set a custom mode not listed in the list of available modes, use
35 --custom. You should probably only use this if you know what you're
36 doing.
37
38 Examples:
39
40 output HDMI-A-1 mode 1920x1080
41
42 output HDMI-A-1 mode 1920x1080@60Hz
43
44 output <name> position|pos <X> <Y>
45 Places the specified output at the specific position in the global
46 coordinate space. The cursor may only be moved between immediately
47 adjacent outputs. If scaling is active, it has to be considered
48 when positioning. For example, if the scaling factor for the left
49 output is 2, the relative position for the right output has to be
50 divided by 2. The reference point is the top left corner so if you
51 want the bottoms aligned this has to be considered as well.
52
53 Example:
54
55 output HDMI1 scale 2
56
57 output HDMI1 pos 0 1020 res 3200x1800
58
59 output eDP1 pos 1600 0 res 1920x1080
60
61 Note that the left x-pos of eDP1 is 1600 = 3200/2 and the bottom y-
62 pos is 1020 + (1800 / 2) = 1920 = 0 + 1920
63
64 output <name> scale <factor>
65 Scales the specified output by the specified scale factor. An inte‐
66 ger is recommended, but fractional values are also supported. If a
67 fractional value are specified, be warned that it is not possible
68 to faithfully represent the contents of your windows - they will be
69 rendered at the next highest integer scale factor and downscaled.
70 You may be better served by setting an integer scale factor and
71 adjusting the font size of your applications to taste. HiDPI isn't
72 supported with Xwayland clients (windows will blur).
73
74 output <name> scale_filter linear|nearest|smart
75 Indicates how to scale application buffers that are rendered at a
76 scale lower than the output's configured scale, such as lo-dpi
77 applications on hi-dpi screens. Linear is smoother and blurrier,
78 nearest (also known as nearest neighbor) is sharper and blockier.
79 Setting "smart" will apply nearest scaling when the output has an
80 integer scale factor, otherwise linear. The default is "smart".
81
82 output <name> subpixel rgb|bgr|vrgb|vbgr|none
83 Manually sets the subpixel hinting for the specified output. This
84 value is usually auto-detected, but some displays may misreport
85 their subpixel geometry. Using the correct subpixel hinting allows
86 for sharper text. Incorrect values will result in blurrier text.
87 When changing this via swaymsg, some applications may need to be
88 restarted to use the new value.
89
90 output <name> background|bg <file> <mode> [<fallback_color>]
91 Sets the wallpaper for the given output to the specified file,
92 using the given scaling mode (one of "stretch", "fill", "fit",
93 "center", "tile"). If the specified file cannot be accessed or if
94 the image does fill the entire output, a fallback color may be pro‐
95 vided to cover the rest of the output. fallback_color should be
96 specified as #RRGGBB. Alpha is not supported.
97
98 output <name> background|bg <color> solid_color
99 Sets the background of the given output to the specified color.
100 color should be specified as #RRGGBB. Alpha is not supported.
101
102 output <name> transform <transform> [clockwise|anticlockwise]
103 Sets the background transform to the given value. Can be one of
104 "90", "180", "270" for rotation; or "flipped", "flipped-90",
105 "flipped-180", "flipped-270" to apply a rotation and flip, or "nor‐
106 mal" to apply no transform. If a single output is chosen and a
107 rotation direction is specified (clockwise or anticlockwise) then
108 the transform is added or subtracted from the current transform.
109
110 output <name> disable|enable
111 Enables or disables the specified output (all outputs are enabled
112 by default).
113
114 output <name> toggle
115 Toggle the specified output.
116
117 output <name> dpms on|off
118 Enables or disables the specified output via DPMS. To turn an out‐
119 put off (ie. blank the screen but keep workspaces as-is), one can
120 set DPMS to off.
121
122 output <name> max_render_time off|<msec>
123 When set to a positive number of milliseconds, enables delaying
124 output rendering to reduce latency. The rendering is delayed in
125 such a way as to leave the specified number of milliseconds before
126 the next presentation for rendering.
127
128 The output rendering normally takes place immediately after a pre‐
129 sentation (vblank, buffer flip, etc.) and the frame callbacks are
130 sent to surfaces immediately after the rendering to give surfaces
131 the most time to draw their next frame. This results in slightly
132 below 2 frames of latency between the surface rendering and commit‐
133 ting new contents, and the contents being shown on screen, on aver‐
134 age. When the output rendering is delayed, the frame callbacks are
135 sent immediately after presentation, and the surfaces have a small
136 timespan (1 / (refresh rate) - max_render_time) to render and com‐
137 mit new contents to be shown on the next presentation, resulting in
138 below 1 frame of latency.
139
140 To set this up for optimal latency:
141 1. Launch some full-screen application that renders continuously,
142 like glxgears.
143 2. Start with max_render_time 1. Increment by 1 if you see frame
144 drops.
145
146
147 To achieve even lower latency, see the max_render_time surface
148 property in sway(5).
149
150 Note that this property has an effect only on backends which report
151 the presentation timestamp and the predicted output refresh rate—
152 the DRM and the Wayland backends. Furthermore, under the Wayland
153 backend the optimal max_render_time value may vary based on the
154 parent compositor rendering timings.
155
157 sway(5) sway-input(5)
158
159
160
161 2020-02-26 sway-output(5)