Skip to content

alex-courtis/way-displays

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

way-displays: Auto Manage Your Wayland Displays

  1. Set resolution/refresh: preferred, highest or custom

  2. Enable VRR / adaptive sync

  3. Arrange in a row or a column

  4. Auto scale based on DPI: 96 is a scale of 1

  5. Update when displays plugged/unplugged

  6. Update when laptop lid closed/opened

Works out of the box: no configuration required.

Wayland successor to xlayoutdisplay, inspired by kanshi.

See wiki for Configuration, Recipes, Troubleshooting and more.

Requirements

A wlroots based compositor that supports the WLR Output Management protocol.

way-displays is blessed for the sway, river and Hpyrland compositors. It may work on others.

way-displays must be run as a daemon, a background server process. It will respond to your configuration changes as well as state changes such as plugging in a monitor or closing the lid.

User should be a member of the input group for querying laptop lid state.

Quick Start

Start with the default config file:

mkdir -p ~/.config/way-displays
cp /etc/way-displays/cfg.yaml ~/.config/way-displays/cfg.yaml

Add yourself to the input group to monitor events:

sudo usermod -a -G input "${USER}"

Start the way-displays server:

Sway

Remove any output commands from your sway config file and add the following:

exec way-displays > /tmp/way-displays.${XDG_VTNR}.${USER}.log 2>&1

River

Add the following to your init:

way-displays > /tmp/way-displays.${XDG_VTNR}.${USER}.log 2>&1 &

Hyprland

Create a launcher: ${HOME}/.config/hypr/start-way-displays.sh

#!/bin/sh

sleep 1 # give Hyprland a moment to set its defaults

way-displays > "/tmp/way-displays.${XDG_VTNR}.${USER}.log" 2>&1

Make it executable:

chmod 755 ${HOME}/.config/hypr/start-way-displays.sh

Add the following to your hyprland.conf:

exec-once = ${HOME}/.config/hypr/start-way-displays.sh

Configure

Restart the compositor and run way-displays -g or look at /tmp/way-displays.1.me.log.

Tweak cfg.yaml to your liking and save it. Changes will be immediately applied.

Alternatively, use the command line to make your changes then persist them with way-displays -w. See man way-displays

You might want to tail -f /tmp/way-displays.1.me.log whilst you are tweaking.

Usage

See Configuration for details on cfg.yaml and the command line.

Start the way-displays server by running once with no arguments after your wayland compositor has been started.

It will remain in the background, responding to changes, such as plugging in a display, and will terminate when you exit the compositor.

It will print messages to inform you of everything that is going on.

You can interact with the server via the command line

The server responds to IPC requests to fetch and mutate state.

Installation

Package Manager

Packaging status

From Source

CI

See CONTRIBUTING

Install / Uninstall

sudo make install
sudo make uninstall

Issues

Please collect debug logs, create a github issue and attach your log.

Questions, Ideas And Contributions

Please raise a github issue

Contributions are most gratefully received, see Milestones for prioritised issues.