What I just shipped
xrandrw is out! v0.1.0 is tagged on GitHub and 0.1.1 is on PyPI. It is a zero-config, self-healing display layout daemon for dwm, i3 and other bare X11 window managers. It watches monitor hotplug and remembers each display by its EDID. External monitors are placed relative to the primary, with an attach-order policy that sticks. The code is at https://github.com/kleinpanic/xrandrw.
Install
pipx install xrandrw
How it works
It is written in Python and needs one dependency, python-xlib. It has six modes. Here they are:
- --apply sets the layout once
- --watch polls
- --daemon uses RandR notifications instead of polling
- --print and --list-state let you inspect it
- --set-pref OUTPUT SIDE sets a preferred side for one output
The daemon runs as a systemd user unit with Restart=always and sd_notify. Config merges the built-in defaults, a system file, your own file, then the environment. State is a JSON file keyed by EDID. Config keys cover wallpaper, HiDPI width, poll interval, logging and churn backoff.
What 0.1.1 fixed
The v0.1.0 release has no notes. These came in 0.1.1:
- a stored preferred side is honored now (persistence was broken)
- DSI and DPI panels count as internal
- the daemon heals itself after a disconnect
- a TOUCH_MAP setting remaps touchscreens
- it no longer applies twice on its own RandR events
- state follows XDG_DATA_HOME
- a pytest and vulture gate
- auto publish to PyPI when a GitHub Release is made
What is not done
0.1.0 was never uploaded to PyPI, so 0.1.1 is the first package. The repo started on 2025-12-09, and the history was imported.
What is next
Plug in a weird monitor setup and tell me if it breaks. I want to know.
P.S Thanks for reading. Consider subbing to the RSS feed.
Klein Panic