Skip to content

Instantly share code, notes, and snippets.

@mastermax1988
mastermax1988 / auto-screen-rotate.sh
Last active November 10, 2020 18:02 — forked from mortie/auto-screen-rotate.sh
Automatically rotate the screen.
#!/bin/sh
# Automatically rotate the screen when the device's orientation changes.
# Use 'xrandr' to get the correct display for the first argument (for example, "eDP-1"),
# and 'xinput' to get the correct input element for your touch screen, if applicable
# (for example, "Wacom HID 486A Finger").
#
# The script depends on the monitor-sensor program from the iio-sensor-proxy package.
Display="eDP1"