From 787e9c9acb976d57046f11fc6d3f826a26e98f18 Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Tue, 5 Nov 2013 23:11:09 +0100 Subject: [PATCH] x220-acpi: updating getXenv.inc --- lenovo-x220-linuxacpi/etc/acpi/actions/btn-lock.sh | 9 ++++----- lenovo-x220-linuxacpi/etc/acpi/actions/btn-touchpad.sh | 5 +++-- lenovo-x220-linuxacpi/etc/acpi/actions/btn-vga.sh | 1 + lenovo-x220-linuxacpi/etc/acpi/actions/btn-vgapause.sh | 2 ++ lenovo-x220-linuxacpi/usr/local/bin/getXenv.inc | 1 + lenovo-x220-linuxacpi/usr/local/bin/tp_alert.sh | 1 + 6 files changed, 12 insertions(+), 7 deletions(-) create mode 120000 lenovo-x220-linuxacpi/usr/local/bin/getXenv.inc create mode 120000 lenovo-x220-linuxacpi/usr/local/bin/tp_alert.sh diff --git a/lenovo-x220-linuxacpi/etc/acpi/actions/btn-lock.sh b/lenovo-x220-linuxacpi/etc/acpi/actions/btn-lock.sh index 7ddecfd..e516c3a 100755 --- a/lenovo-x220-linuxacpi/etc/acpi/actions/btn-lock.sh +++ b/lenovo-x220-linuxacpi/etc/acpi/actions/btn-lock.sh @@ -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 diff --git a/lenovo-x220-linuxacpi/etc/acpi/actions/btn-touchpad.sh b/lenovo-x220-linuxacpi/etc/acpi/actions/btn-touchpad.sh index b837bcb..4257532 100755 --- a/lenovo-x220-linuxacpi/etc/acpi/actions/btn-touchpad.sh +++ b/lenovo-x220-linuxacpi/etc/acpi/actions/btn-touchpad.sh @@ -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 diff --git a/lenovo-x220-linuxacpi/etc/acpi/actions/btn-vga.sh b/lenovo-x220-linuxacpi/etc/acpi/actions/btn-vga.sh index 629b400..0b319af 100755 --- a/lenovo-x220-linuxacpi/etc/acpi/actions/btn-vga.sh +++ b/lenovo-x220-linuxacpi/etc/acpi/actions/btn-vga.sh @@ -1,6 +1,7 @@ #! /bin/sh . /usr/local/bin/getXenv.inc +getXconsole STATEFILE="/var/run/vgastate" LVDS1_defaultmode="1366x768" diff --git a/lenovo-x220-linuxacpi/etc/acpi/actions/btn-vgapause.sh b/lenovo-x220-linuxacpi/etc/acpi/actions/btn-vgapause.sh index 16db1f3..d493a24 100755 --- a/lenovo-x220-linuxacpi/etc/acpi/actions/btn-vgapause.sh +++ b/lenovo-x220-linuxacpi/etc/acpi/actions/btn-vgapause.sh @@ -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 index 0000000..266a687 --- /dev/null +++ b/lenovo-x220-linuxacpi/usr/local/bin/getXenv.inc @@ -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 index 0000000..c2990da --- /dev/null +++ b/lenovo-x220-linuxacpi/usr/local/bin/tp_alert.sh @@ -0,0 +1 @@ +/root/bin/tp_alert.sh \ No newline at end of file -- 2.39.5