]> git.sthu.org Git - shutils.git/commitdiff
x220-acpi: updating getXenv.inc
authorStefan Huber <shuber@sthu.org>
Tue, 5 Nov 2013 22:11:09 +0000 (23:11 +0100)
committerStefan Huber <shuber@sthu.org>
Tue, 5 Nov 2013 22:11:09 +0000 (23:11 +0100)
lenovo-x220-linuxacpi/etc/acpi/actions/btn-lock.sh
lenovo-x220-linuxacpi/etc/acpi/actions/btn-touchpad.sh
lenovo-x220-linuxacpi/etc/acpi/actions/btn-vga.sh
lenovo-x220-linuxacpi/etc/acpi/actions/btn-vgapause.sh
lenovo-x220-linuxacpi/usr/local/bin/getXenv.inc [new symlink]
lenovo-x220-linuxacpi/usr/local/bin/tp_alert.sh [new symlink]

index 7ddecfd6f2743d91e791545f4aa315c0a026b633..e516c3ad16b6575ed9a4272fba0d40ae991135de 100755 (executable)
@@ -1,16 +1,15 @@
 #!/bin/sh
 logger "Locking screen..."
 
+. /usr/local/bin/getXenv.inc
+getXconsole
+
 LOG=/var/log/btn-lock.log
 date >> $LOG
 
 /usr/local/bin/lockkde.sh
 echo "Locked..." >> $LOG
 
-. /usr/local/bin/getXenv.inc
-
 #Thinkpad acceleration alert
-su $user -c /usr/local/bin/tp_alert.sh >> $LOG 2>&1
-
-
+su $XUSER -c /usr/local/bin/tp_alert.sh >> $LOG 2>&1
 
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
 
 
index 629b400a6e4177dfb8b3ba64f1f2b446b20d71b3..0b319af3367afb50afa2bae9340ff2bad4d401af 100755 (executable)
@@ -1,6 +1,7 @@
 #! /bin/sh
 
 . /usr/local/bin/getXenv.inc
+getXconsole
 
 STATEFILE="/var/run/vgastate"
 LVDS1_defaultmode="1366x768"
index 16db1f3984ec8a0660a9255d715e88c87f3630ed..d493a2408a1a755d4ee517bc9dd233055e8c1096 100755 (executable)
@@ -1,5 +1,7 @@
 #! /bin/bash
+
 . /usr/local/bin/getXenv.inc
+getXconsole
 
 logger "Disabeling VGA"
 xrandr --output VGA1 --off
diff --git a/lenovo-x220-linuxacpi/usr/local/bin/getXenv.inc b/lenovo-x220-linuxacpi/usr/local/bin/getXenv.inc
new file mode 120000 (symlink)
index 0000000..266a687
--- /dev/null
@@ -0,0 +1 @@
+/root/bin/getXenv.inc
\ No newline at end of file
diff --git a/lenovo-x220-linuxacpi/usr/local/bin/tp_alert.sh b/lenovo-x220-linuxacpi/usr/local/bin/tp_alert.sh
new file mode 120000 (symlink)
index 0000000..c2990da
--- /dev/null
@@ -0,0 +1 @@
+/root/bin/tp_alert.sh
\ No newline at end of file