2018-10-14 14:48:51 +00:00
|
|
|
sway-output(5)
|
|
|
|
|
|
|
|
# NAME
|
|
|
|
|
|
|
|
sway-output - output configuration commands for sway
|
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
|
|
|
You may combine output commands into one, like so:
|
|
|
|
|
2019-10-02 21:20:05 +00:00
|
|
|
output HDMI-A-1 mode 1920x1080 pos 1920 0 bg ~/wallpaper.png stretch
|
2018-10-14 14:48:51 +00:00
|
|
|
|
2019-01-27 16:27:34 +00:00
|
|
|
You can get a list of output names with *swaymsg -t get_outputs*. You may also
|
2019-07-17 23:48:28 +00:00
|
|
|
match any output by using the output name "\*". Additionally, "-" can be used
|
|
|
|
to match the focused output by name and "--" can be used to match the focused
|
|
|
|
output by its identifier.
|
2018-10-14 14:48:51 +00:00
|
|
|
|
2018-10-25 08:08:29 +00:00
|
|
|
Some outputs may have different names when disconnecting and reconnecting. To
|
|
|
|
identify these, the name can be substituted for a string consisting of the make,
|
2019-01-27 16:27:34 +00:00
|
|
|
model and serial which you can get from *swaymsg -t get_outputs*. Each value
|
2018-10-25 08:08:29 +00:00
|
|
|
must be separated by one space. For example:
|
|
|
|
|
2019-10-02 21:20:05 +00:00
|
|
|
output "Some Company ABC123 0x00000000" pos 1920 0
|
2018-10-25 08:08:29 +00:00
|
|
|
|
2018-10-14 14:48:51 +00:00
|
|
|
# COMMANDS
|
|
|
|
|
2022-08-08 05:38:24 +00:00
|
|
|
*output* <name> mode|resolution|res [--custom] <width>x<height>[@<rate>Hz]
|
2018-10-14 14:48:51 +00:00
|
|
|
Configures the specified output to use the given mode. Modes are a
|
|
|
|
combination of width and height (in pixels) and a refresh rate that your
|
|
|
|
display can be configured to use. For a list of available modes for each
|
2019-01-27 16:27:34 +00:00
|
|
|
output, use *swaymsg -t get_outputs*.
|
2018-10-14 14:48:51 +00:00
|
|
|
|
2019-10-26 20:36:49 +00:00
|
|
|
To set a custom mode not listed in the list of available modes, use
|
|
|
|
*--custom*. You should probably only use this if you know what you're
|
|
|
|
doing.
|
|
|
|
|
2018-10-14 14:48:51 +00:00
|
|
|
Examples:
|
|
|
|
|
|
|
|
output HDMI-A-1 mode 1920x1080
|
|
|
|
|
|
|
|
output HDMI-A-1 mode 1920x1080@60Hz
|
|
|
|
|
2021-07-18 10:05:47 +00:00
|
|
|
*output* <name> modeline <clock> <hdisplay> <hsync_start> <hsync_end> <htotal> <vdisplay> <vsync_start> <vsync_end> <vtotal> <hsync> <vsync>
|
|
|
|
Configures the specified output to use the given modeline. It can be
|
|
|
|
generated using *cvt*(1) and *gtf*(1) commands. See *xorg.conf*(5).
|
|
|
|
Only supported on DRM backend.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
output HDMI-A-1 modeline 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
|
|
|
|
|
|
|
|
|
2018-10-14 14:48:51 +00:00
|
|
|
*output* <name> position|pos <X> <Y>
|
|
|
|
Places the specified output at the specific position in the global
|
2019-01-28 22:33:01 +00:00
|
|
|
coordinate space. The cursor may only be moved between immediately
|
|
|
|
adjacent outputs. If scaling is active, it has to be considered when
|
|
|
|
positioning. For example, if the scaling factor for the left output is
|
|
|
|
2, the relative position for the right output has to be divided by 2.
|
|
|
|
The reference point is the top left corner so if you want the bottoms
|
|
|
|
aligned this has to be considered as well.
|
2018-12-27 16:25:48 +00:00
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
output HDMI1 scale 2
|
|
|
|
|
2019-01-02 08:04:12 +00:00
|
|
|
output HDMI1 pos 0 1020 res 3200x1800
|
2018-12-27 16:25:48 +00:00
|
|
|
|
|
|
|
output eDP1 pos 1600 0 res 1920x1080
|
|
|
|
|
2019-02-27 10:48:30 +00:00
|
|
|
Note that the left x-pos of eDP1 is 1600 = 3200/2 and the bottom y-pos is
|
2019-01-02 08:04:12 +00:00
|
|
|
1020 + (1800 / 2) = 1920 = 0 + 1920
|
2018-10-14 14:48:51 +00:00
|
|
|
|
|
|
|
*output* <name> scale <factor>
|
|
|
|
Scales the specified output by the specified scale _factor_. An integer is
|
2024-03-11 18:20:17 +00:00
|
|
|
recommended, but fractional values are also supported. You may be better
|
|
|
|
served by setting an integer scale factor and adjusting the font size of
|
|
|
|
your applications to taste. HiDPI isn't supported with Xwayland clients
|
2024-03-11 18:22:36 +00:00
|
|
|
(windows will blur). A fractional scale may be slightly adjusted to match
|
|
|
|
requirements of the protocol.
|
2018-10-14 14:48:51 +00:00
|
|
|
|
2019-11-13 18:23:36 +00:00
|
|
|
*output* <name> scale_filter linear|nearest|smart
|
|
|
|
Indicates how to scale application buffers that are rendered at a scale
|
|
|
|
lower than the output's configured scale, such as lo-dpi applications on
|
|
|
|
hi-dpi screens. Linear is smoother and blurrier, nearest (also known as
|
|
|
|
nearest neighbor) is sharper and blockier. Setting "smart" will apply
|
|
|
|
nearest scaling when the output has an integer scale factor, otherwise
|
|
|
|
linear. The default is "smart".
|
|
|
|
|
2019-02-11 00:56:57 +00:00
|
|
|
*output* <name> subpixel rgb|bgr|vrgb|vbgr|none
|
|
|
|
Manually sets the subpixel hinting for the specified output. This value is
|
|
|
|
usually auto-detected, but some displays may misreport their subpixel
|
|
|
|
geometry. Using the correct subpixel hinting allows for sharper text.
|
|
|
|
Incorrect values will result in blurrier text. When changing this via
|
|
|
|
*swaymsg*, some applications may need to be restarted to use the new value.
|
|
|
|
|
2019-01-27 16:27:34 +00:00
|
|
|
*output* <name> background|bg <file> <mode> [<fallback_color>]
|
2018-10-14 14:48:51 +00:00
|
|
|
Sets the wallpaper for the given output to the specified file, using the
|
|
|
|
given scaling mode (one of "stretch", "fill", "fit", "center", "tile"). If
|
2020-04-29 09:09:43 +00:00
|
|
|
the specified file cannot be accessed or if the image does not fill the entire
|
2018-10-14 14:48:51 +00:00
|
|
|
output, a fallback color may be provided to cover the rest of the output.
|
2019-09-10 17:13:12 +00:00
|
|
|
_fallback_color_ should be specified as _#RRGGBB_. Alpha is not supported.
|
2018-10-14 14:48:51 +00:00
|
|
|
|
2019-01-27 16:27:34 +00:00
|
|
|
*output* <name> background|bg <color> solid_color
|
2018-10-14 14:48:51 +00:00
|
|
|
Sets the background of the given output to the specified color. _color_
|
|
|
|
should be specified as _#RRGGBB_. Alpha is not supported.
|
|
|
|
|
2018-10-31 21:06:49 +00:00
|
|
|
*output* <name> transform <transform> [clockwise|anticlockwise]
|
2018-10-14 14:48:51 +00:00
|
|
|
Sets the background transform to the given value. Can be one of "90", "180",
|
|
|
|
"270" for rotation; or "flipped", "flipped-90", "flipped-180", "flipped-270"
|
2020-02-10 17:29:44 +00:00
|
|
|
to apply a rotation and flip, or "normal" to apply no transform. The
|
|
|
|
rotation is performed clockwise. If a single output is chosen and a
|
|
|
|
rotation direction is specified (_clockwise_ or _anticlockwise_) then the
|
2020-04-20 07:33:40 +00:00
|
|
|
transform is added or subtracted from the current transform (this cannot be
|
|
|
|
used directly in the configuration file).
|
2018-10-14 14:48:51 +00:00
|
|
|
|
|
|
|
*output* <name> disable|enable
|
|
|
|
Enables or disables the specified output (all outputs are enabled by
|
|
|
|
default).
|
|
|
|
|
2022-12-29 08:48:50 +00:00
|
|
|
As opposed to the _power_ command, the output will lose its current
|
2022-06-22 20:06:21 +00:00
|
|
|
workspace and windows.
|
|
|
|
|
2019-05-11 06:57:53 +00:00
|
|
|
*output* <name> toggle
|
|
|
|
Toggle the specified output.
|
|
|
|
|
2022-06-22 20:06:21 +00:00
|
|
|
*output* <name> power on|off|toggle
|
|
|
|
Turns on or off the specified output.
|
|
|
|
|
|
|
|
As opposed to the _enable_ and _disable_ commands, the output keeps its
|
|
|
|
current workspaces and windows.
|
|
|
|
|
2021-03-15 16:06:46 +00:00
|
|
|
*output* <name> dpms on|off|toggle
|
2022-06-22 20:06:21 +00:00
|
|
|
Deprecated. Alias for _power_.
|
2019-02-27 10:48:30 +00:00
|
|
|
|
2019-09-25 10:58:27 +00:00
|
|
|
*output* <name> max_render_time off|<msec>
|
2020-05-01 15:20:41 +00:00
|
|
|
Controls when sway composites the output, as a positive number of
|
|
|
|
milliseconds before the next display refresh. A smaller number leads to
|
|
|
|
fresher composited frames and lower perceived input latency, but if set too
|
|
|
|
low, sway may not finish compositing in time for display refresh, leading to
|
|
|
|
delayed frames.
|
|
|
|
|
|
|
|
When set to off, sway composites immediately after display refresh,
|
|
|
|
maximizing time available for compositing.
|
|
|
|
|
|
|
|
To adjust when applications are instructed to render, see *max_render_time*
|
|
|
|
in *sway*(5).
|
2019-09-25 10:58:27 +00:00
|
|
|
|
|
|
|
To set this up for optimal latency:
|
|
|
|
. Launch some _full-screen_ application that renders continuously, like
|
|
|
|
*glxgears*.
|
|
|
|
. Start with *max_render_time 1*. Increment by *1* if you see frame
|
|
|
|
drops.
|
|
|
|
|
2020-05-01 15:20:41 +00:00
|
|
|
This setting only has an effect on Wayland and DRM backends, as support for
|
|
|
|
presentation timestamps and predicted output refresh rate is required.
|
2019-11-17 10:54:05 +00:00
|
|
|
|
2020-03-02 14:30:50 +00:00
|
|
|
*output* <name> adaptive_sync on|off
|
|
|
|
Enables or disables adaptive synchronization (often referred to as Variable
|
|
|
|
Refresh Rate, or by the vendor-specific names FreeSync/G-Sync).
|
|
|
|
|
2021-06-13 13:09:07 +00:00
|
|
|
Adaptive sync allows clients to submit frames a little too late without
|
2020-03-02 14:30:50 +00:00
|
|
|
having to wait a whole refresh period to display it on screen. Enabling
|
|
|
|
adaptive sync can improve latency, but can cause flickering on some
|
|
|
|
hardware.
|
|
|
|
|
2021-09-03 01:45:23 +00:00
|
|
|
*output* <name> render_bit_depth 8|10
|
|
|
|
Controls the color channel bit depth at which frames are rendered; the
|
|
|
|
default is currently 8 bits per channel.
|
|
|
|
|
|
|
|
Setting higher values will not have an effect if hardware and software lack
|
|
|
|
support for such bit depths. Successfully increasing the render bit depth
|
|
|
|
will not necessarily increase the bit depth of the frames sent to a display.
|
|
|
|
An increased render bit depth may provide smoother rendering of gradients,
|
|
|
|
and screenshots which can more precisely store the colors of programs
|
|
|
|
which display high bit depth colors.
|
|
|
|
|
|
|
|
Warnings: this can break screenshot/screencast programs which have not been
|
|
|
|
updated to work with different bit depths. This command is experimental,
|
|
|
|
and may be removed or changed in the future.
|
|
|
|
|
2018-10-14 14:48:51 +00:00
|
|
|
# SEE ALSO
|
|
|
|
|
|
|
|
*sway*(5) *sway-input*(5)
|