20

On my main computer, I use xrandr and/or arandr with i3 to configure and save multiple different screen layouts and map them to various keyboard shortcuts.

I recently installed Fedora with Gnome on Wayland. I am totally at a loss when it comes to configuring screen layouts. Answers I find online seem overly complicated and involved.

Is there a direct analogue of xrandr for Wayland where I can change the orientation, for example, of a monitor?

imz -- Ivan Zakharyaschev
  • 15,113
  • 15
  • 61
  • 123
pictorexcrucia
  • 125
  • 1
  • 1
  • 9

3 Answers3

8

This only works on wayland compositors that implement the

wlr-output-management-unstable-v1

e.g. sway (and probably others that use wlroots)

https://github.com/cyclopsian/wdisplays

archlinux has an aur package for it https://aur.archlinux.org/packages/wdisplays-git/

SultanLegend
  • 463
  • 1
  • 4
  • 9
  • 1
    It seems like the link is that. Most maintained fork I could find was this: https://github.com/MichaelAquilina/wdisplays/ – Kaligule Jun 20 '22 at 08:29
2

It appears ( https://forums.fedoraforum.org/showthread.php?312000-Wayland-xrandr-equivalent and https://fedoraproject.org/wiki/Wayland_features#XRandR_control_of_Wayland_outputs) that you won't find an equivalent for Wayland, at least in part because some of the Wayland devs think "You shouldn't want to do that" (https://bbs.archlinux.org/viewtopic.php?pid=1666148#p1666148) and in part because Wayland has a different architecture and does things differently.

If you need custom resolutions this may help https://askubuntu.com/questions/973499/wayland-how-to-set-a-custom-resolution or it may not.

Petro
  • 636
  • 3
  • 7
  • 3
    That seems really crazy to me. And no I don't want to change my resolution. I want to, for example, sometimes use my monitor in "landscape" mode and other times use it in "portrait" mode. Who on earth would think I shouldn't want to do that? – pictorexcrucia Feb 06 '20 at 00:51
  • https://www.phoronix.com/scan.php?page=news_item&px=MTMyMzI This link seems to claim there is an equivalent. It was posted several years ago and yet I still do not see simple instructions for how to change orientation of a screen. – pictorexcrucia Feb 06 '20 at 00:53
  • Should be in the "display settings" I couldn't find any way to do it at the command line.(removed link that didn't say what I thought it did) – Petro Feb 06 '20 at 01:05
  • As to the Phoronix link, that was about 7 years old, and some other stuff I found suggested that the developers didn't really want to expose the APIs so that people couldn't do things they "shouldn't want to". This attitude presumes that the developers know everything that people might need to do. Which most developers can't. – Petro Feb 06 '20 at 01:29
  • @pictorexcrucia wdisplays has a `Transform` option that lets you rotate the screen – SultanLegend Dec 30 '20 at 16:31
1

I've been using this script and it is working well for me. https://gitlab.com/Oschowa/gnome-randr.

I have just set up aliases to call it with different settings, e.g. 4K@60Hz for watching Netflix etc, 1440p@120Hz for moonlight/gamestream remote gaming. For games I don't want native 4K, I want a high fps. LMAO at "You shouldn't want to do that".

KuleRucket
  • 11
  • 1