[Debian-eeepc-devel] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. 54c23287e15e0ffabccdef18819aaf1434ac4726
Nico Golde
nion at debian.org
Fri Mar 7 13:32:28 UTC 2008
The following commit has been merged in the master branch:
commit 54c23287e15e0ffabccdef18819aaf1434ac4726
Author: Nico Golde <nion at debian.org>
Date: Fri Mar 7 14:32:43 2008 +0100
interpret vga status and call xrandr
diff --git a/actions/vga-toggle.sh b/actions/vga-toggle.sh
index 48bc070..5b01ab9 100644
--- a/actions/vga-toggle.sh
+++ b/actions/vga-toggle.sh
@@ -1,5 +1,6 @@
#!/bin/sh
+set -x
# return: 0 on disconnect, 1 on connected vga, 2 else
getvga_status(){
STATUS=$( xrandr -q | grep VGA | cut -d ' ' -f 2,3 )
@@ -16,6 +17,13 @@ getvga_status(){
esac
}
-getvga_status
+getvga_status;
# handle return value
+case $? in
+ 2)
+ xrandr --output VGA --off
+ ;;
+ *)
+ xrandr --auto;;
+esac
--
Maintenance of eeepc-acpi-scripts debian package
More information about the Debian-eeepc-devel
mailing list