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> position|pos <X> <Y>
44           Places the specified output at the specific position in the global
45           coordinate space. The cursor may only be moved between immediately
46           adjacent outputs. If scaling is active, it has to be considered
47           when positioning. For example, if the scaling factor for the left
48           output is 2, the relative position for the right output has to be
49           divided by 2. The reference point is the top left corner so if you
50           want the bottoms aligned this has to be considered as well.
51
52           Example:
53
54               output HDMI1 scale 2
55
56               output HDMI1 pos 0 1020 res 3200x1800
57
58               output eDP1 pos 1600 0 res 1920x1080
59
60           Note that the left x-pos of eDP1 is 1600 = 3200/2 and the bottom y-
61           pos is 1020 + (1800 / 2) = 1920 = 0 + 1920
62
63       output <name> scale <factor>
64           Scales the specified output by the specified scale factor. An inte‐
65           ger is recommended, but fractional values are also supported. If a
66           fractional value are specified, be warned that it is not possible
67           to faithfully represent the contents of your windows - they will be
68           rendered at the next highest integer scale factor and downscaled.
69           You may be better served by setting an integer scale factor and ad‐
70           justing the font size of your applications to taste. HiDPI isn't
71           supported with Xwayland clients (windows will blur).
72
73       output <name> scale_filter linear|nearest|smart
74           Indicates how to scale application buffers that are rendered at a
75           scale lower than the output's configured scale, such as lo-dpi ap‐
76           plications on hi-dpi screens. Linear is smoother and blurrier,
77           nearest (also known as nearest neighbor) is sharper and blockier.
78           Setting "smart" will apply nearest scaling when the output has an
79           integer scale factor, otherwise linear. The default is "smart".
80
81       output <name> subpixel rgb|bgr|vrgb|vbgr|none
82           Manually sets the subpixel hinting for the specified output. This
83           value is usually auto-detected, but some displays may misreport
84           their subpixel geometry. Using the correct subpixel hinting allows
85           for sharper text. Incorrect values will result in blurrier text.
86           When changing this via swaymsg, some applications may need to be
87           restarted to use the new value.
88
89       output <name> background|bg <file> <mode> [<fallback_color>]
90           Sets the wallpaper for the given output to the specified file, us‐
91           ing the given scaling mode (one of "stretch", "fill", "fit", "cen‐
92           ter", "tile"). If the specified file cannot be accessed or if the
93           image does not fill the entire output, a fallback color may be pro‐
94           vided to cover the rest of the output. fallback_color should be
95           specified as #RRGGBB. Alpha is not supported.
96
97       output <name> background|bg <color> solid_color
98           Sets the background of the given output to the specified color.
99           color should be specified as #RRGGBB. Alpha is not supported.
100
101       output <name> transform <transform> [clockwise|anticlockwise]
102           Sets the background transform to the given value. Can be one of
103           "90", "180", "270" for rotation; or "flipped", "flipped-90",
104           "flipped-180", "flipped-270" to apply a rotation and flip, or "nor‐
105           mal" to apply no transform. The rotation is performed clockwise. If
106           a single output is chosen and a rotation direction is specified
107           (clockwise or anticlockwise) then the transform is added or sub‐
108           tracted from the current transform (this cannot be used directly in
109           the configuration file).
110
111       output <name> disable|enable
112           Enables or disables the specified output (all outputs are enabled
113           by default).
114
115       output <name> toggle
116           Toggle the specified output.
117
118       output <name> dpms on|off
119           Enables or disables the specified output via DPMS. To turn an out‐
120           put off (ie. blank the screen but keep workspaces as-is), one can
121           set DPMS to off.
122
123       output <name> max_render_time off|<msec>
124           Controls when sway composites the output, as a positive number of
125           milliseconds before the next display refresh. A smaller number
126           leads to fresher composited frames and lower perceived input la‐
127           tency, but if set too low, sway may not finish compositing in time
128           for display refresh, leading to delayed frames.
129
130           When set to off, sway composites immediately after display refresh,
131           maximizing time available for compositing.
132
133           To adjust when applications are instructed to render, see max_ren‐
134           der_time in sway(5).
135
136           To set this up for optimal latency:
137           1.   Launch some full-screen application that renders continuously,
138               like glxgears.
139           2.   Start with max_render_time 1. Increment by 1 if you see frame
140               drops.
141
142
143           This setting only has an effect on Wayland and DRM backends, as
144           support for presentation timestamps and predicted output refresh
145           rate is required.
146
147       output <name> adaptive_sync on|off
148           Enables or disables adaptive synchronization (often referred to as
149           Variable Refresh Rate, or by the vendor-specific names FreeSync/G-
150           Sync).
151
152           Adaptive sync allows clients to submit frames a little to late
153           without having to wait a whole refresh period to display it on
154           screen. Enabling adaptive sync can improve latency, but can cause
155           flickering on some hardware.
156

SEE ALSO

158       sway(5) sway-input(5)
159
160
161
162                                  2021-07-23                    sway-output(5)
Impressum