auto-wlr-randr

Crates.ioauto-wlr-randr
lib.rsauto-wlr-randr
version1.1.0
created_at2025-08-26 21:27:59.658454+00
updated_at2025-12-28 15:20:15.378349+00
descriptionAutomatic display configuration for Wayland compositors
homepagehttps://github.com/nikromen/auto-wlr-randr
repositoryhttps://github.com/nikromen/auto-wlr-randr
max_upload_size
id1811889
size130,066
(nikromen)

documentation

https://github.com/nikromen/auto-wlr-randr/blob/main/README.md

README

auto-wlr-randr

Automatic display configuration for Wayland compositors implementing the wlr-output-management protocol.

About

auto-wlr-randr is a daemon that automatically monitors and configures connected displays in Wayland compositors. It detects when displays are connected or disconnected and applies the appropriate configuration profiles based on rules defined in the configuration file.

Features

  • Automatic detection of connected displays
  • Profile-based configuration management
  • Stands on shoulders of wlr-randr
  • Command-line control utility
  • Systemd integration

Installation

From Source

  1. Clone this repository:

    git clone https://github.com/nikromen/auto-wlr-randr.git
    cd auto-wlr-randr
    
  2. Build the project:

    cargo build --release
    
  3. Install binaries and (optional) service:

    sudo cp target/release/auto-wlr-randr /usr/local/bin/
    sudo cp target/release/auto-wlr-randrctl /usr/local/bin/
    cp files/auto-wlr-randr.service ~/.config/systemd/user/auto-wlr-randr.service
    systemctl --user daemon-reload
    systemctl --user enable --now auto-wlr-randr.service
    

From Crates.io

  1. Install package:

    cargo install auto-wlr-randr
    
  2. (optional) Install systemd service:

    Copy files/auto-wlr-randr.service file from the repository and run:

    systemctl --user daemon-reload
    systemctl --user enable --now auto-wlr-randr.service
    

Fedora

If you're using Fedora, you can install an RPM package from Copr repository:

sudo dnf copr enable nikromen/auto-wlr-randr
sudo dnf install auto-wlr-randr
# or -git version which is built against main branch
sudo dnf install auto-wlr-randr-git
# enable the systemd service
systemctl --user enable --now auto-wlr-randr.service

Manual

Read these:

man 1 auto-wlr-randr
man 5 auto-wlr-randr
man 1 auto-wlr-randrctl

Or read the short guilde below.

Configuration

Create a configuration file at ~/.config/auto-wlr-randr/config.toml.

For example configuration, take look at example config file

Running as a Service

Enable and start the user service:

systemctl --user enable --now auto-wlr-randr.service

Command-line Usage

Daemon

auto-wlr-randr --config /path/to/config.toml

Control Utility

# Show current status
auto-wlr-randrctl status

# Reload configuration
auto-wlr-randrctl reload

# Switch to a profile
auto-wlr-randrctl switch home-office

Note

The functionality and interface is inspired by kanshi, but differs in that it uses wlr-randr instead of implementing the protocol directly. This approach was chosen because when this tool was created as a proof of concept, the wlr-randr protocol implementation was more advanced than the implementation of kanshi. Additionally, auto-wlr-randr uses TOML configuration files which have library support across various programming languages, making it easier to develop frontends for it, which was needed for the wayrandr project.

Commit count: 15

cargo fmt