Sway Edition - General Conversation!

Display configuration

Sway manages displays for you, xrandr should not be used.

Run swaymsg -t get_outputs to get a list of output names. Then use the output command to arrange your displays.

For detailed information, check the manual. Run man 5 sway-output.

Multihead

Managing multiple monitors is simple through the use of multiple output commands.

e.g., if we want to have a monitor with HDMI1 and a resolution of 1920x1080, and to the right of it a laptop monitor with eDP1 and a resolution of 1600x900; the following two commands can be placed in your config file:

output HDMI1 pos 0 0 res 1920x1080
output eDP1 pos 1920 0 res 1600x900

Take a note that you might want to change the focus of monitor on sway launch. Add this to your sway config:

focus output <name-or-identifier>

or

exec swaymsg focus output <name-or-identifier>

so it doesn’t trigger on reload.

For more details read man 5 sway-output.

1 Like