screen rotation daemon
Go to file
mnussbaum 5ca46c50f8 Fix detection of initial rotation state
This ensures that if rot8 starts while the window server output is
rotated, but the physical device is in a "normal" position, rot8 will
detect the initial misalignment and rotate the window server's output to
reflect the device's physical state.

This scenario occurs if you frequently toggle rot8 on and off as form of
rotation lock, and you:

1. Use rot8 to rotate the output sideways
2. Turn rot8 off
3. Move the physical device back into a "normal" position
4. Turn rot8 back on
2019-09-06 00:00:12 -07:00
src Fix detection of initial rotation state 2019-09-06 00:00:12 -07:00
.gitignore 🌱 2019-05-18 22:27:15 +02:00
Cargo.lock Fix detection of initial rotation state 2019-09-06 00:00:12 -07:00
Cargo.toml Fix detection of initial rotation state 2019-09-06 00:00:12 -07:00
LICENSE add LICENSE 2019-08-16 20:23:42 +02:00
README.md add sleep arg & update readme 2019-08-17 01:47:36 +02:00

README.md

rot8

automatic display rotation using built-in accelerometer

Automatic rotate modern Linux desktop screen and input devices. Handy for convertible touchscreen notebooks like the Kaby Lake model of the HP Spectre x360.

Compatible with sway and X11.

Rust language and the cargo package manager are required to build the binary.

$ git clone https://github.com/efernau/rot8
$ cd rot8 && cargo build --release
$ cp target/release/rot8  /usr/bin/rot8

For Sway map your input to the output device:

$ swaymsg <INPUTDEVICE> map_to_output <OUTPUTDEVICE>

Call Rote8 from sway configuration file ~/.config/sway/config:

exec rot8

For X11 set Touchscreen Device

rot8 --touchscreen <TOUCHSCREEN>

there are the following args.

--sleep         // Set sleep millis (500)
--display       // Set Display Device (eDP-1)
--touchscreen   // Set Touchscreen Device X11 (ELAN0732:00 04F3:22E1)