1sway-output(5)                File Formats Manual               sway-output(5)
2
3
4

NAME

6       sway-output - output configuration commands for sway
7

DESCRIPTION

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

COMMANDS

27       output <name> mode|resolution|res [--custom] <WIDTHxHEIGHT>[@<RATE>Hz]
28           Configures the specified output to use the given mode. Modes are a
29           combination of width and height (in pixels) and a refresh rate that
30           your display can be configured to use. For a list of available
31           modes for each output, use swaymsg -t get_outputs.
32
33           To set a custom mode not listed in the list of available modes, use
34           --custom. You should probably only use this if you know what you're
35           doing.
36
37           Examples:
38
39               output HDMI-A-1 mode 1920x1080
40
41               output HDMI-A-1 mode 1920x1080@60Hz
42
43       output <name> modeline <clock> <hdisplay> <hsync_start> <hsync_end>
44       <htotal> <vdisplay> <vsync_start> <vsync_end> <vtotal> <hsync> <vsync>
45           Configures the specified output to use the given modeline. It can
46           be generated using cvt(1) and gtf(1) commands. See xorg.conf(5).
47           Only supported on DRM backend.
48
49           Example:
50
51               output HDMI-A-1 modeline 173.00 1920 2048 2248 2576 1080 1083
52               1088 1120 -hsync +vsync
53
54       output <name> position|pos <X> <Y>
55           Places the specified output at the specific position in the global
56           coordinate space. The cursor may only be moved between immediately
57           adjacent outputs. If scaling is active, it has to be considered
58           when positioning. For example, if the scaling factor for the left
59           output is 2, the relative position for the right output has to be
60           divided by 2. The reference point is the top left corner so if you
61           want the bottoms aligned this has to be considered as well.
62
63           Example:
64
65               output HDMI1 scale 2
66
67               output HDMI1 pos 0 1020 res 3200x1800
68
69               output eDP1 pos 1600 0 res 1920x1080
70
71           Note that the left x-pos of eDP1 is 1600 = 3200/2 and the bottom y-
72           pos is 1020 + (1800 / 2) = 1920 = 0 + 1920
73
74       output <name> scale <factor>
75           Scales the specified output by the specified scale factor. An inte‐
76           ger is recommended, but fractional values are also supported. If a
77           fractional value are specified, be warned that it is not possible
78           to faithfully represent the contents of your windows - they will be
79           rendered at the next highest integer scale factor and downscaled.
80           You may be better served by setting an integer scale factor and ad‐
81           justing the font size of your applications to taste. HiDPI isn't
82           supported with Xwayland clients (windows will blur).
83
84       output <name> scale_filter linear|nearest|smart
85           Indicates how to scale application buffers that are rendered at a
86           scale lower than the output's configured scale, such as lo-dpi ap‐
87           plications on hi-dpi screens. Linear is smoother and blurrier,
88           nearest (also known as nearest neighbor) is sharper and blockier.
89           Setting "smart" will apply nearest scaling when the output has an
90           integer scale factor, otherwise linear. The default is "smart".
91
92       output <name> subpixel rgb|bgr|vrgb|vbgr|none
93           Manually sets the subpixel hinting for the specified output. This
94           value is usually auto-detected, but some displays may misreport
95           their subpixel geometry. Using the correct subpixel hinting allows
96           for sharper text. Incorrect values will result in blurrier text.
97           When changing this via swaymsg, some applications may need to be
98           restarted to use the new value.
99
100       output <name> background|bg <file> <mode> [<fallback_color>]
101           Sets the wallpaper for the given output to the specified file, us‐
102           ing the given scaling mode (one of "stretch", "fill", "fit", "cen‐
103           ter", "tile"). If the specified file cannot be accessed or if the
104           image does not fill the entire output, a fallback color may be pro‐
105           vided to cover the rest of the output. fallback_color should be
106           specified as #RRGGBB. Alpha is not supported.
107
108       output <name> background|bg <color> solid_color
109           Sets the background of the given output to the specified color.
110           color should be specified as #RRGGBB. Alpha is not supported.
111
112       output <name> transform <transform> [clockwise|anticlockwise]
113           Sets the background transform to the given value. Can be one of
114           "90", "180", "270" for rotation; or "flipped", "flipped-90",
115           "flipped-180", "flipped-270" to apply a rotation and flip, or "nor‐
116           mal" to apply no transform. The rotation is performed clockwise. If
117           a single output is chosen and a rotation direction is specified
118           (clockwise or anticlockwise) then the transform is added or sub‐
119           tracted from the current transform (this cannot be used directly in
120           the configuration file).
121
122       output <name> disable|enable
123           Enables or disables the specified output (all outputs are enabled
124           by default).
125
126       output <name> toggle
127           Toggle the specified output.
128
129       output <name> dpms on|off|toggle
130           Enables or disables the specified output via DPMS. To turn an out‐
131           put off (ie. blank the screen but keep workspaces as-is), one can
132           set DPMS to off.
133
134       output <name> max_render_time off|<msec>
135           Controls when sway composites the output, as a positive number of
136           milliseconds before the next display refresh. A smaller number
137           leads to fresher composited frames and lower perceived input la‐
138           tency, but if set too low, sway may not finish compositing in time
139           for display refresh, leading to delayed frames.
140
141           When set to off, sway composites immediately after display refresh,
142           maximizing time available for compositing.
143
144           To adjust when applications are instructed to render, see max_ren‐
145           der_time in sway(5).
146
147           To set this up for optimal latency:
148           1.   Launch some full-screen application that renders continuously,
149               like glxgears.
150           2.   Start with max_render_time 1. Increment by 1 if you see frame
151               drops.
152
153
154           This setting only has an effect on Wayland and DRM backends, as
155           support for presentation timestamps and predicted output refresh
156           rate is required.
157
158       output <name> adaptive_sync on|off
159           Enables or disables adaptive synchronization (often referred to as
160           Variable Refresh Rate, or by the vendor-specific names FreeSync/G-
161           Sync).
162
163           Adaptive sync allows clients to submit frames a little too late
164           without having to wait a whole refresh period to display it on
165           screen. Enabling adaptive sync can improve latency, but can cause
166           flickering on some hardware.
167
168       output <name> render_bit_depth 8|10
169           Controls the color channel bit depth at which frames are rendered;
170           the default is currently 8 bits per channel.
171
172           Setting higher values will not have an effect if hardware and soft‐
173           ware lack support for such bit depths. Successfully increasing the
174           render bit depth will not necessarily increase the bit depth of the
175           frames sent to a display. An increased render bit depth may provide
176           smoother rendering of gradients, and screenshots which can more
177           precisely store the colors of programs which display high bit depth
178           colors.
179
180           Warnings: this can break screenshot/screencast programs which have
181           not been updated to work with different bit depths. This command is
182           experimental, and may be removed or changed in the future.
183

SEE ALSO

185       sway(5) sway-input(5)
186
187
188
189                                  2022-11-14                    sway-output(5)
Impressum