summaryrefslogtreecommitdiff
path: root/presenterctl.sh
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-02-08 13:56:28 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-02-08 15:00:35 +0100
commitd93b32e3ad28f1b46d0ea317d7c72165d63cd805 (patch)
treebeabb5b1ee812e26768edf27a49f20e3218a9c35 /presenterctl.sh
downloadpresenterctl-d93b32e3ad28f1b46d0ea317d7c72165d63cd805.tar.gz
presenterctl-d93b32e3ad28f1b46d0ea317d7c72165d63cd805.tar.bz2
presenterctl-d93b32e3ad28f1b46d0ea317d7c72165d63cd805.zip
Initialize presenterctl for Logitech R400HEADmaster
Diffstat (limited to 'presenterctl.sh')
-rwxr-xr-xpresenterctl.sh24
1 files changed, 24 insertions, 0 deletions
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"