Skip to content

Instantly share code, notes, and snippets.

@ACamposPT
ACamposPT / auto_screen_rotation.sh
Last active October 25, 2023 18:52 — forked from mildmojo/rotate_desktop.sh
Script to rotate the screen and touch devices on modern Linux desktops. Great for convertible laptops.
#!/bin/bash
# Auto rotate screen based on device orientation
# Receives input from monitor-sensor (part of iio-sensor-proxy package)
# Screen orientation is set based upon accelerometer position
# This script should be added to startup applications for the user
# Rotates modern Linux desktop screen and input devices to match. Handy for
# convertible notebooks. Call this script from panel launchers, keyboard
# shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.).