qrti / rotbright Goto Github PK
View Code? Open in Web Editor NEWLinux bash scripts to get display, brightness, touchscreen (and pen) in tune
License: MIT License
Linux bash scripts to get display, brightness, touchscreen (and pen) in tune
License: MIT License
Touchpad need to be rotated too in order to work correctly according to the screen. The device 'ASUS HID Device ASUS HID Device Touchpad' has transformation matrix property available through xinput command.
It was working badly originally on Linux (by default screen has a portrait orientation, but touchpad hasn't). But it could be easily fixed by this script.
fix:
DEVICE2="ASUS HID Device ASUS HID Device Touchpad" # touchpad
case "$2" in normal) [ ! -z "$DEVICE0" ] && xinput set-prop "$DEVICE0" "$TRANSFORM" 1 0 0 0 1 0 0 0 1 [ ! -z "$DEVICE1" ] && xinput set-prop "$DEVICE1" "$TRANSFORM" 1 0 0 0 1 0 0 0 1 [ ! -z "$DEVICE2" ] && xinput set-prop "$DEVICE2" "$TRANSFORM" 0 -1 1 1 0 0 0 0 1 ;; inverted) [ ! -z "$DEVICE0" ] && xinput set-prop "$DEVICE0" "$TRANSFORM" -1 0 1 0 -1 1 0 0 1 [ ! -z "$DEVICE1" ] && xinput set-prop "$DEVICE1" "$TRANSFORM" -1 0 1 0 -1 1 0 0 1 [ ! -z "$DEVICE2" ] && xinput set-prop "$DEVICE2" "$TRANSFORM" 0 1 0 -1 0 1 0 0 1 ;; left) [ ! -z "$DEVICE0" ] && xinput set-prop "$DEVICE0" "$TRANSFORM" 0 -1 1 1 0 0 0 0 1 [ ! -z "$DEVICE1" ] && xinput set-prop "$DEVICE1" "$TRANSFORM" 0 -1 1 1 0 0 0 0 1 [ ! -z "$DEVICE2" ] && xinput set-prop "$DEVICE2" "$TRANSFORM" -1 0 1 0 -1 1 0 0 1 ;; right) [ ! -z "$DEVICE0" ] && xinput set-prop "$DEVICE0" "$TRANSFORM" 0 1 0 -1 0 1 0 0 1 [ ! -z "$DEVICE1" ] && xinput set-prop "$DEVICE1" "$TRANSFORM" 0 1 0 -1 0 1 0 0 1 [ ! -z "$DEVICE2" ] && xinput set-prop "$DEVICE2" "$TRANSFORM" 1 0 0 0 1 0 0 0 1 ;; esac
I have an Asus T102HA and the pen device name (id) differs from the one that is in the script.
$ uname -a Linux T102 4.19.24-1-MANJARO #1 SMP PREEMPT Wed Feb 20 22:59:23 UTC 2019 x86_64 GNU/Linux
fix:
DEVICE1="ELAN22A6:00 04F3:22A6 Pen Pen (0)"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.