Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Re-adjust X11 and touch screen when using laptop and touch screen monitor
#!/bin/bash
# get Wacom IDS
[[ -z $1 ]] && undo= || undo=yes
WACOM_IDS=$(xinput --list | grep "Wacom" | awk -F= '{ print $2 } ' | awk ' { print $1 } ')
# get device
INTERNAL=LVDS1
for arg in $WACOM_IDS
do
xinput --map-to-output $arg $INTERNAL
done
[[ "$undo" = "yes" ]] && exit
# now the same for the Dell monitor
DELL_IDS=$(xinput --list | grep "CoolTouch" | awk -F= '{ print $2 } ' | awk ' { print $1 } ')
# get device
DELL=$(xrandr | grep "1920x1080" | awk '{ print $1 } ')
for arg in $DELL_IDS
do
xinput --map-to-output $arg $DELL
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.