GithubHelp home page GithubHelp logo

rotbright's People

Contributors

qrti avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

np2048

rotbright's Issues

Touchpad works incorrectly with rotated screen

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:

  1. new variable
    DEVICE2="ASUS HID Device ASUS HID Device Touchpad" # touchpad
  2. new transormation case:
    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

Incorrect ID for the pen device

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)"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.