From d93b32e3ad28f1b46d0ea317d7c72165d63cd805 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Fri, 8 Feb 2013 13:56:28 +0100 Subject: Initialize presenterctl for Logitech R400 --- presenterctl.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 presenterctl.sh (limited to 'presenterctl.sh') diff --git a/presenterctl.sh b/presenterctl.sh new file mode 100755 index 0000000..3e3e750 --- /dev/null +++ b/presenterctl.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +[[ "x$1" = "xremove" ]] && exec sh -c 'xinput remove-master "remote pointer"' + +xinput remove-master "remote pointer" &> /dev/null +xinput create-master remote +$(dirname $0 )/repeat-xi2 `xinput --list --id-only "remote keyboard"` 500 8 + +for id in `xinput --list --id-only | sed "s/[^0-9]*//g"` +do + name=`xinput --list-props "$id" | sed -n "1s/.*'\([^']*\)'.*/\\1/p"` + [[ "x$name" != "xLogitech USB Receiver" ]] && continue; + + xinput reattach "$id" "remote pointer" +done + +echo -n "Attach 'TPPS/2 IBM TrackPoint' to 'remote pointer'? (Y/n): " +read attach +[[ "x$attach" = "xn" ]] && exit + +xinput reattach "TPPS/2 IBM TrackPoint" "remote pointer" +echo -n "Type enter to attach back to core pointer." +read +xinput reattach "TPPS/2 IBM TrackPoint" "Virtual core pointer" -- cgit