You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2.6 KiB


swayrandr and lswayrandr are programs to configure your screen-layouts in the Sway tiling window manager on Wayland. They are drop in replacements of xrandr and lxrandr respectively. They are intended to be used with the Sway tiling window manager on Wayland. They will not work under any other desktop environment (Pull Requests welcome!) nor will they work on X11.

This repository contains two programs: swayrandr and lswayrandr.


For both programs to work, you will need your screen-configuration in a separate file, like so:

# in ~/.config/sway/config:
include monitor.swayconfig

The default file to be modified is ~/.config/sway/monitor.swayconfig. swayrandr will overwrite, whatever you hand to it!


Replaces xrandr and works in a similar way. Without any parameters its output is similar -- listing the monitors and their available modes.


-above string
	Place <output> above the provided monitor
	Set <output> active (contrasts inactive and disabled)
-below string
	Place <output> below the provided monitor
-config-file string
	Configuration file to write to (default "~/.config/sway/monitor.swayconfig")
	Disable <output>
	Don't write any configuration files, just dry-run and throw any occurring errors
	Enable <output>
	Print this help text
	Disable <output>
-left-of string
	Place <output> left of the provided monitor
	List all active monitors
	List all connected monitors
-mode string
	Set the provided mode: <Width>x<Height>@<RefreshRate>
	Disable <output>
-output string
	The output to manipulate
-position string
	Set the top-left corner of <ouput> to the coordinates <X>x<Y> (or <X>+<Y>)
	Set <output> as the primary one (focused)
-refresh float
	Set the refresh rate (in KHz; float) (default -Inf)
-right-of string
	Place <output> right of the provided monitor
-same-as string
	Place <output> on top of the provided monitor and use the same resolution if available
-scale float
	Set the scaling-factor of <output>; floats > 0 (default -Inf)
	Print version Information


Uses swayrandr to replace lxrandr. It allows choosing the screen configuration via a GTK3-based GUI.


  • Arch Users: use the provided PKGBUILD.
  • Everyone else (<repo> contains the checked out Repository):
export GOPATH=$(pwd)
mkdir -p "src/swayrandr"
mv <repo>/* src/swayrandr

cd src/swayrandr
# installs go-build-time dependencies
make dep

# builds both the CLI and GUI app
make dist

# Install the two applications onto your system (or don't)