Set-up monitors for sway tiling window manager
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.
 
 
 
Stefan Naumann afb3f1a46d
fixed improper positioning, when scaling left/above monitors
1 year ago
lib fixed improper positioning, when scaling left/above monitors 1 year ago
LICENSE Initial commit 3 years ago
Makefile update 2 years ago
PKGBUILD go modules and PKGBUILD updates 2 years ago
README.md added help information to swayrandr; filled README.md 3 years ago
go.mod renamed the module to codeberg 2 years ago
go.sum go modules and PKGBUILD updates 2 years ago
main.go renamed the module to codeberg 2 years ago
swayinput.go renamed the module to codeberg 2 years ago
ui.glade update 2 years ago
ui.go fixed improper positioning, when scaling left/above monitors 1 year ago
ui_noheader.glade GTK3 header bar; added margins in the monitor-lines 3 years ago

README.md

swayrandr

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.

Set-up

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!

swayrandr

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

Parameters:

-above string
	Place <output> above the provided monitor
-active
	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
	Disable <output>
-dryrun
	Don't write any configuration files, just dry-run and throw any occurring errors
-enable
	Enable <output>
-help
	Print this help text
-inactive
	Disable <output>
-left-of string
	Place <output> left of the provided monitor
-listactivemonitors
	List all active monitors
-listmonitors
	List all connected monitors
-mode string
	Set the provided mode: <Width>x<Height>@<RefreshRate>
-off
	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>)
-primary
	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)
-version
	Print version Information

lswayrandr

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

Installation

  • Arch Users: use the provided PKGBUILD.
  • Everyone else (<repo> contains the checked out Repository):
#!/bin/bash
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)