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 c5488047bf Merge branch 'main' of git.stefannaumann.de:snaums/swayrandr into main 1 month ago
lib added documentation comments to the source-files 1 month ago
LICENSE Initial commit 1 month ago
Makefile added install target to Makefile 1 month ago
PKGBUILD bug fixes; interaction between lswayrandr and swayrandr seems to work now; finding config-file works now 1 month ago
README.md added help information to swayrandr; filled README.md 1 month ago
main.go added help information to swayrandr; filled README.md 1 month ago
ui.glade moved buttons around 1 month ago
ui.go fixed offset error, when the screens are in a weird state.. 1 month ago
ui_noheader.glade GTK3 header bar; added margins in the monitor-lines 1 month 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)