-
Set resolution/refresh: preferred, highest or custom
-
Enable VRR / adaptive sync
-
Arrange in a row or a column
-
Auto scale based on DPI: 96 is a scale of 1
-
Update when displays plugged/unplugged
-
Update when laptop lid closed/opened
Works out of the box: no configuration required.
Wayland successor to xlayoutdisplay, inspired by kanshi.
- Requirements
- Quick Start
- Usage
- Installation
- Known Issues with Workarounds
- What Is Preferred Mode?
- On Scale And Blurring
- Questions, Suggestions And Ideas
- Help Wanted - GUI Configurator
way-displays is known to work on the sway, river and Hpyrland compositors. It may work on any wlroots compositor that supports the WLR Output Management protocol.
The user must be a member of the input
group.
mkdir -p ~/.config/way-displays
cp /etc/way-displays/cfg.yaml ~/.config/way-displays/cfg.yaml
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
Add the following to your init
:
way-displays > /tmp/way-displays.${XDG_VTNR}.${USER}.log 2>&1 &
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
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
.
You might want to tail -f /tmp/way-displays.1.me.log
whilst you are tweaking.
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.
See CONTRIBUTING
sudo make install
sudo make uninstall
W [10:09:44.542] WARNING: open '/dev/input/event0' failed 13: 'Permission denied'
User must be in the input
group to monitor libinput events.
Fixed in libinput 1.21.0.
One or many displays may be rendered unusable after setting a MODE
. This has occurred when a higher resolution/refresh than the preferred has been selected, particularly when using a HDMI cable.
It may be possible to work around this by setting WLR_DRM_NO_MODIFIERS=1
. See wlroots documentation for details.
You can set it when directly starting sway e.g.
WLR_DRM_NO_MODIFIERS=1 sway ...
If you use a display manager, you will need to export it from your non-login shell environment e.g. .zshenv
.
export WLR_DRM_NO_MODIFIERS=1
When a display is scaled (X11) linux games will render at the display's scaled resolution, rather than the monitor's native resolution. There is work underway to fix this.
In the meantime, you may temporarily disable scaling via way-displays -s SCALING off
Displays advertise their available modes when plugged in. Some displays specify a mode as "preferred".
The preferred mode is usually the highest resolution/refresh available and it's a good default. You shouldn't need to tweak this.
In some cases the preferred mode is a horrid "compatibility" mode e.g. 1024x768@60Hz
. You could fix this by setting MODE
to MAX
for that display.
When using a display scale that is not a whole number, the result will not be a pixel perfect rendition of the unscaled content. There are no fractional pixels so there will be rounding and thus some blurring.
To ameliorate this, we always round our scale to a multiple of one eighth. This results in a nice round binary number, which minimises some of the rounding and results in a smoother image. If you're interested, our rounded scale is a wl_fixed_t.
Please create a github issue and attach the log /tmp/way-displays.1.me.log
Contributions are always welcome.
Milestone 1.10 contains a list of issue I would be eternally grateful for you to work on.