2017-10-31 04:02:59 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-01-20 13:11:56 -05:00
|
|
|
#ids=$(xinput --list|grep "SAM\|Digitizer"|grep -oP "id=\K[\w]*") # gets by name
|
|
|
|
ids=$(xinput list | grep -oP "^⎜.*id=\K[\w]*" ) # gets all pointing
|
2017-10-31 04:02:59 -04:00
|
|
|
#ids=( 9 10 11 )
|
|
|
|
|
|
|
|
transform_matrix=""
|
|
|
|
|
|
|
|
rotate=$1
|
|
|
|
case $rotate in
|
|
|
|
0) #normal
|
|
|
|
transform_matrix="1 0 0 0 1 0 0 0 1";;
|
|
|
|
1) #left
|
|
|
|
transform_matrix="0 -1 1 1 0 0 0 0 1";;
|
|
|
|
2) #inverted
|
|
|
|
transform_matrix="-1 0 1 0 -1 1 0 0 1";;
|
|
|
|
3) #right
|
|
|
|
transform_matrix="0 1 0 -1 0 1 0 0 1";;
|
|
|
|
esac
|
|
|
|
|
|
|
|
for input in ${ids[@]}; do
|
|
|
|
echo xinput set-prop $input "Coordinate Transformation Matrix" $transform_matrix
|
|
|
|
xinput set-prop $input "Coordinate Transformation Matrix" $transform_matrix
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
xrandr -o $rotate
|
2021-08-18 21:08:29 -04:00
|
|
|
|
|
|
|
if [ -e "$HOME/.fehbg" ]
|
|
|
|
then
|
|
|
|
~/.fehbg
|
|
|
|
fi
|