mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

flip-yoga (589B)


      1 #!/bin/bash
      2 
      3 case $1 in
      4 normal )
      5 xrandr --output LVDS-1 --rotate normal
      6 xinput set-prop 'ELAN Touchscreen' 'Coordinate Transformation Matrix' 1 0 0 0 1 0 0 0 1
      7 ;;
      8 inverted )
      9 xrandr --output LVDS-1 --rotate inverted
     10 xinput set-prop 'ELAN Touchscreen' 'Coordinate Transformation Matrix' -1 0 1 0 -1 1 0 0 1
     11 ;;
     12 left )
     13 xrandr --output LVDS-1 --rotate left
     14 xinput set-prop 'ELAN Touchscreen' 'Coordinate Transformation Matrix' 0 -1 1 1 0 0 0 0 1
     15 ;;
     16 right )
     17 xrandr --output LVDS-1 --rotate right
     18 xinput set-prop 'ELAN Touchscreen' 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1
     19 ;;
     20 esac
     21 
     22