From 8444e5d13099143005c70c157461873b633ac91c Mon Sep 17 00:00:00 2001 From: Gardouille Date: Fri, 26 Sep 2014 00:27:42 +0200 Subject: [PATCH] Add scripts to manage Wii and Xbox 360 gamepad. ... Maybe old scripts --- manette360 | 2 ++ wiimote | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100755 manette360 create mode 100755 wiimote diff --git a/manette360 b/manette360 new file mode 100755 index 0000000..185c072 --- /dev/null +++ b/manette360 @@ -0,0 +1,2 @@ +#!/bin/sh +xinput set-int-prop 5 'Device Enabled' 32 0 diff --git a/wiimote b/wiimote new file mode 100755 index 0000000..58faeb8 --- /dev/null +++ b/wiimote @@ -0,0 +1,35 @@ +#! /bin/sh + +# Description: Manage a Wiimote +# +# Depend: wminput, bluetooth +# +# $1: Wiimote mode +# ir: infrared +# acc: accelerometer +# off: turn off + +# Wiimote MAC's address +mac="00:21:BD:07:A9:B1" + +case "${1}" in + ir ) + sudo /etc/init.d/bluetooth restart + sudo wminput -c ir_ptr ${mac} + echo "Activation of Wiimote in InfraRed";; + + acc ) + sudo /etc/init.d/bluetooth restart + echo "Activation of Wiimote in accelerometer";; + + off ) + sudo /etc/init.d/bluetooth stop + echo "by =)";; + + * ) + echo "Bad argument" + echo "use, wiimote [ir, acc, off]" + exit 1;; +esac + +exit 0