You need to replace DP-1 with your display name from xrandr, and "MTouch" with a string that shows up in your touch screen's name when executing "xinput".
Created
September 22, 2021 11:18
-
-
Save itskenny0/24a4ca24dce6c03a10c32db9c75423e7 to your computer and use it in GitHub Desktop.
assign touchscreen to monitor in linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IDS=$(xinput | grep MTouch | grep -oP 'id=[0-9]{2}' | sed 's/id=//g') | |
for i in $IDS; do | |
xinput map-to-output $i DP-1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment