Skip to content

Instantly share code, notes, and snippets.

View NojaneKashaniSaffar's full-sized avatar

noji NojaneKashaniSaffar

  • Paris - Nice (France)
View GitHub Profile
@NojaneKashaniSaffar
NojaneKashaniSaffar / auto_rotate.sh
Created October 31, 2023 14:42 — forked from Links2004/auto_rotate.sh
Linux auto rotate screen and adjust touch matrix based on accelerometer data
#!/bin/bash
# Auto rotate screen based on device orientation
# based on https://linuxappfinder.com/blog/auto_screen_rotation_in_ubuntu
# install
# 1. apt-get install iio-sensor-proxy inotify-tools
# 2. add script to autostart
# Receives input from monitor-sensor (part of iio-sensor-proxy package)
# Screen orientation and launcher location is set based upon accelerometer position