Skip to content

Instantly share code, notes, and snippets.

@benelog
Created September 6, 2016 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benelog/7e2cc3de7ce20812adbee6ae7971a3cc to your computer and use it in GitHub Desktop.
Save benelog/7e2cc3de7ce20812adbee6ae7971a3cc to your computer and use it in GitHub Desktop.
#!/bin/bash
echo xinput map-to-output for Multi-Touch-V3004
input_id=`xinput | grep Multi-Touch-V3004 | awk '{print substr($5,4,length($5)-3)}'`
echo Input device id: $input_id
output_id=$1
if [[ -z $output_id ]]; then
output_id=2
fi
echo Output port: HDMI$output_id
xinput map-to-output $input_id HDMI$output_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment