This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Automatic stylus (pen) orientation for HP Spectre x360 | |
# adapted by Efrem Rensi | |
# This is a fix for an apparent bug in Cinnamon whereby System Settings >> General >> Automatic Screen Rotation | |
# Rotates the screen and touch functionality, but the pen orientation does not rotate | |
# Based on chadm's script at https://linuxappfinder.com/blog/auto_screen_rotation_in_ubuntu. | |
# Receives input from monitor-sensor (part of iio-sensor-proxy package) and sets the touchscreen | |
# orientation based on the accellerometer positionn. We assume that the display rotation is |