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

SEE ALSO

193       sway(5) sway-input(5)
194
195
196
197                                  2023-09-14                    sway-output(5)
Impressum