Hi,

was thinking about my usecase of closing the netbook, when it is connected to 
an extern monitor, mouse and keyboard - and that I don't want to hybernate in 
this situation. xrandr gives me something alon the lines like: "VGA1 
disconnected" and I could use this in /etc/acpi/actions/lid.sh to check, if an 
external monitor is connected and terminate the script at that location so it 
is not run till the end.
Now, my bash-scripting skills are so limited, that I only got the script to 
run completely or not at all, because my checks were all wether always true or 
always false.

Could anyone help me out with a snippet or may it even be feasible to make 
this behaviour the default?

Sincerely,

Malte


PS: My last attempt (after dozens of try-and-ERROR-cycles :)) on the problem 
was:

m...@eee:~$ head -n 20 /etc/acpi/actions/lid.sh
#!/bin/sh


# Block added by me (mdik) ###############

S1 = $(xrandr|grep '^VGA.*disconnected.*')

if ! [ $S1 = '' ]; then
        exit 0
fi

##########################################


[ -e /usr/share/acpi-support/policy-funcs ] || exit 0

. /usr/share/acpi-support/policy-funcs


if [ `CheckPolicy` = 0 ] ; then



Thanks in advance!

_______________________________________________
Debian-eeepc-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-eeepc-devel

Reply via email to