#!/bin/ksh #see `xinput --list' to see what devices to put here #this only operates with the pen and finger touch on x380 yoga dp_name=eDP-1 case $1 in i) xrandr --output "$dp_name" --rotate inverted xinput set-prop "Wacom Pen and multitouch sensor Pen stylus" --type=float\ "Coordinate Transformation Matrix" -1 0 1 0 -1 1 0 0 1 xinput set-prop "Wacom Pen and multitouch sensor Finger touch" --type=float\ "Coordinate Transformation Matrix" -1 0 1 0 -1 1 0 0 1;; l) xrandr --output "$dp_name" --rotate left xinput set-prop "Wacom Pen and multitouch sensor Pen stylus" --type=float\ "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1 xinput set-prop "Wacom Pen and multitouch sensor Finger touch" --type=float\ "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1;; r) xrandr --output "$dp_name" --rotate right xinput set-prop "Wacom Pen and multitouch sensor Pen stylus" --type=float\ "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1 xinput set-prop "Wacom Pen and multitouch sensor Finger touch" --type=float\ "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1;; *) xrandr --output "$dp_name" --rotate normal xinput set-prop "Wacom Pen and multitouch sensor Pen stylus" --type=float\ "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1 xinput set-prop "Wacom Pen and multitouch sensor Finger touch" --type=float\ "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1;; esac