Lines 17-22
Link Here
|
17 |
fi |
17 |
fi |
18 |
} |
18 |
} |
19 |
|
19 |
|
|
|
20 |
aticonfig='/opt/ati/bin/aticonfig' |
21 |
|
22 |
# default high power state |
23 |
default_state=`$aticonfig --lsp | grep 'default state' | cut -c 3` |
20 |
|
24 |
|
21 |
grep -q closed /proc/acpi/button/lid/*/state |
25 |
grep -q closed /proc/acpi/button/lid/*/state |
22 |
if [ $? = 0 ]; then |
26 |
if [ $? = 0 ]; then |
Lines 46-52
Link Here
|
46 |
getXuser; |
50 |
getXuser; |
47 |
if [ x"$XAUTHORITY" != x"" ]; then |
51 |
if [ x"$XAUTHORITY" != x"" ]; then |
48 |
export DISPLAY=":$displaynum" |
52 |
export DISPLAY=":$displaynum" |
49 |
su $user -c "/usr/X11R6/bin/aticonfig --set-powerstate=1 --effective=now" |
53 |
su $user -c "$aticonfig --set-powerstate=1 --effective=now" |
50 |
fi |
54 |
fi |
51 |
done |
55 |
done |
52 |
else |
56 |
else |
Lines 56-62
Link Here
|
56 |
getXuser; |
60 |
getXuser; |
57 |
if [ x"$XAUTHORITY" != x"" ]; then |
61 |
if [ x"$XAUTHORITY" != x"" ]; then |
58 |
export DISPLAY=":$displaynum" |
62 |
export DISPLAY=":$displaynum" |
59 |
su $user -c "/usr/X11R6/bin/aticonfig --set-powerstate=3 --effective=now" |
63 |
su $user -c "$aticonfig --set-powerstate=$default_state --effective=now" |
60 |
fi |
64 |
fi |
61 |
done |
65 |
done |
62 |
fi |
66 |
fi |