rofi-randr

Crates.iorofi-randr
lib.rsrofi-randr
version0.1.0
sourcesrc
created_at2023-06-27 07:19:11.083281
updated_at2023-06-27 07:19:11.083281
descriptionRofi script to manage ResizeAndRotate (randr) settings on various platforms
homepage
repositoryhttps://github.com/Rintse/rofi-randr
max_upload_size
id901033
size85,529
Rintse (Rintse)

documentation

README

Rofi-randr

A (massively overengineered) rofi script to manage randr (Resize And Rotate) features of some display servers.

Backends

This program supports multiple backends. It automatically determines which one to use, but you can override this behaviour by setting DPY_SERVER_OVERRIDE in your environment.

  • libxrandr - Uses the xrandr crate to call libxrandr bindings.
  • swayipc - Uses the swayipc crate to issue commands to sway.
  • xrandr_cli - Just calls xrandr in a subprocess.

Usage

Compile using cargo build --release. Then call rofi using:

rofi -modi "randr:/path/to/executable" -show randr

NOTE: When using wayland backends (like swayipc), it is best to use the wayland fork of rofi.

Features

The following features are supported:

  • Enable outputs
  • Disable outputs
  • Set primary output
  • Change resolution
  • Change refresh rate
  • Position outputs
  • Rotate outputs

Backends can specify which of these features they support. Sway, for example, has no 'primary display'.

TODO

  • Make a general wayland backend, perhaps using wayland-client.
  • In the meantime, maybe make a wlr-randr_cli backend.
  • Redo error structure.
Commit count: 2

cargo fmt