Skip to content

Instantly share code, notes, and snippets.

View leighleighleigh's full-sized avatar

Leigh Oliver leighleighleigh

  • Ambit Robotics
  • Melbourne, Australia
  • 03:32 (UTC +10:00)
View GitHub Profile
@leighleighleigh
leighleighleigh / auto_rotate.sh
Last active November 2, 2020 12:32 — 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