Skip to content

Instantly share code, notes, and snippets.

@Luigi-Pizzolito
Last active March 13, 2025 03:42
Show Gist options
  • Save Luigi-Pizzolito/a39b0c0590d776720d04849766a168e8 to your computer and use it in GitHub Desktop.
Save Luigi-Pizzolito/a39b0c0590d776720d04849766a168e8 to your computer and use it in GitHub Desktop.
Arch Redirect 2nd Monitor Touchscreen
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="32d7", ATTR{idProduct}=="0001", TAG+="systemd", ENV{SYSTEMD_WANTS}="map-touchscreen.service"
sudo nvim /etc/systemd/system/map-touchscreen.service
sudo systemctl daemon-reload
sudo systemctl enable map-touchscreen.service
sudo systemctl start map-touchscreen.service
sudo nvim /etc/udev/rules.d/99-touch-screen.rules
sudo udevadm control --reload-rules
journalctl -xe #for debugging
xinput #for listing input device IDs
xrandr # for listing display names
lsusb # for listing usb input devices and info
#!/bin/bash
# Find the XAUTHORITY file for the current display
export DISPLAY=:0
export XAUTHORITY=/tmp/xauth_rwEfPy
# Run the xinput command as the logged-in user
/usr/bin/xinput map-to-output 32 DP-3
/usr/bin/xinput map-to-output 31 DP-3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment