Crates.io | gnome-randr |
lib.rs | gnome-randr |
version | 0.1.1 |
source | src |
created_at | 2021-10-26 17:35:34.494706 |
updated_at | 2021-10-26 19:19:52.601588 |
description | A reimplementation of xrandr for Gnome on Wayland |
homepage | https://github.com/maxwellainatchi/gnome-randr-rust |
repository | https://github.com/maxwellainatchi/gnome-randr-rust |
max_upload_size | |
id | 472014 |
size | 54,938 |
A reimplementation of xrandr
for Gnome on Wayland, especially for systems that don't support wlr-output-management-unstable-v1
(e.g. Manjaro). Written ground-up in rust for performance. This is also my first project in rust, so any suggestions are welcome!
gnome-randr-rust
uses the dbus
object org.gnome.Mutter.DisplayConfig
. See https://wiki.gnome.org/Initiatives/Wayland/Gaps/DisplayConfig for the original proposal, although the specification listed there is somewhat out of date (checked via dbus introspect
on Gnome shell 40.5). A better (commented) XML file is listed in the gnome-monitor-config
project here.
The GetCurrentState
method is used to list information about the displays, while ApplyMonitorsConfig
is used to modify the current configuration.
This project was heavily inspired by xrandr
(obviously) and also gnome-randr
. Sadly, gnome-randr.py
appears to be broken as of my gnome version (40.5) when trying to modify display configurations.
gnome-randr.py
is also slower than my rust reimplementation: querying the python script takes about 30ms on my 3-monitor system, while the rust implementation takes about 3ms (xrandr
takes about 1.5ms, but is also displaying different information due to limitations in xrandr
's bridge.)