I know how to rotate the screen in Xorg using xrandr
or in Wayland using the gnome-control-center
GUI, but is there a way to do it in Wayland using a command line interface or an API call ?
Context: I have a convertible laptop which is not supported by iio-sensor-proxy
, and I would like to use a script or shortcut to quickly rotate the screen. Going back to Xorg is not an option.
Best Answer
A partial solution is to set the
rotate-monitor
key to some keybinding usinggsettings
ordconf-editor
.For instance, the following command will cause
Ctrl+F8
to rotate the screen counterclockwise:This does not allow the user to specify the target orientation, but only to rotate the screen until the desired orientation is reached.