x220-acpi: updating getXenv.inc
[shutils.git] / lenovo-x220-linuxacpi / etc / acpi / actions / btn-touchpad.sh
index b837bcb1228ef7298d5ffa06be81f6491c9cf457..42575325254c0a0359384925869a33df3ff5ff24 100755 (executable)
@@ -1,13 +1,14 @@
 #!/bin/sh
 
 . /usr/local/bin/getXenv.inc
+getXconsole
 
 if (synclient -l | grep TouchpadOff | grep -q 0) ; then
        echo "touchpad on, turning it off"
-       su $user -c "synclient TouchpadOff=1"
+       su $XUSER -c "synclient TouchpadOff=1"
 else
        echo "touchpad off, turning it on"
-       su $user -c "synclient TouchpadOff=0"
+       su $XUSER -c "synclient TouchpadOff=0"
 fi