summaryrefslogtreecommitdiffstats
path: root/snippets
diff options
context:
space:
mode:
authorFabian Affolter <fab@fedoraproject.org>2008-11-15 15:03:36 +0100
committerFabian Affolter <fab@fedoraproject.org>2008-11-15 15:03:36 +0100
commitd83eff5abba8335ee6ca2b29304237babd12efcc (patch)
tree161bfc09bae1366bcd6e8b5674a21a063190d4a9 /snippets
parent86590f9fe9d18fe1f6ae1608adced232b5ec3718 (diff)
downloadspin-kickstarts-d83eff5abba8335ee6ca2b29304237babd12efcc.tar.gz
spin-kickstarts-d83eff5abba8335ee6ca2b29304237babd12efcc.tar.xz
spin-kickstarts-d83eff5abba8335ee6ca2b29304237babd12efcc.zip
Initial import
Diffstat (limited to 'snippets')
-rw-r--r--snippets/eeepc900-modifications.ks153
1 files changed, 153 insertions, 0 deletions
diff --git a/snippets/eeepc900-modifications.ks b/snippets/eeepc900-modifications.ks
new file mode 100644
index 0000000..1adf4e9
--- /dev/null
+++ b/snippets/eeepc900-modifications.ks
@@ -0,0 +1,153 @@
+###### Eee PC 900 stuff ####################################################
+#
+###### Hotkeys #############################################################
+cat > /etc/acpi/actions/hotkeys.sh << EOHOTKEY
+#!/bin/bash
+
+export DISPLAY=:0
+
+case "$3" in
+
+ #Fn+F2
+ 00000010)
+ # Wlan On
+ /etc/acpi/actions/wlan.sh poweron
+ ;;
+ 00000011)
+ # Wlan Off
+ /etc/acpi/actions/wlan.sh poweroff
+ ;;
+
+ #Fn+F6
+ 00000012)
+ # Webcam switch
+ /etc/acpi/actions/camera.sh
+ # TaskManager
+ # /usr/bin/gnome-system-monitor
+ ;;
+
+ #Fn+F7
+ 00000013)
+ # Volume mute
+ /usr/bin/amixer set -D hw:0 Master toggle
+ ;;
+
+ #Fn+F8
+ 00000014)
+ # Volume down
+ /usr/bin/amixer set -D hw:0 Master 10%- unmute
+ ;;
+
+ #Fn+F9
+ 00000015)
+ # Volume up
+ /usr/bin/amixer set -D hw:0 Master 10%+ unmute
+ ;;
+
+ #Fn+F5
+ 00000030)
+
+ /usr/bin/xrandr --output VGA --mode 1024x768 \
+ --output LVDS --off
+
+ if [[ "$?" != "0" ]]; then
+
+ /usr/bin/xrandr --output VGA --preferred \
+ --output LVDS --off
+
+ fi
+ ;;
+
+ 00000031)
+
+ /usr/bin/xrandr --output LVDS --mode 800x480 \
+ --output VGA --mode 800x600
+
+ ;;
+
+ 00000032)
+
+ /usr/bin/xrandr --output VGA --off \
+ --output LVDS --preferred
+
+ ;;
+ *)
+ logger "ACPI hotkey $3 action is not defined"
+ ;;
+esac
+EOHOTKEY
+
+###### WLAN #############################################################
+cat > /etc/acpi/actions/wlan.sh << EOF
+#!/bin/bash
+
+PWR=$(cat /sys/devices/platform/eeepc/wlan)
+
+UnloadModules() {
+ rmmod ath_pci
+ rmmod ath_rate_sample
+ rmmod wlan_scan_sta
+ rmmod wlan_tkip
+ rmmod wlan_wep
+ rmmod wlan
+}
+
+LoadModules() {
+ modprobe ath_pci
+}
+
+case $1 in
+ poweron)
+ if [[ "$PWR" = "0" ]]; then
+ modprobe pciehp pciehp_force=1
+
+ echo 1 > /sys/devices/platform/eeepc/wlan
+
+ rmmod pciehp
+
+ fi
+ ;;
+
+ poweroff)
+ if [[ "$PWR" = "1" ]]; then
+
+ modprobe pciehp pciehp_force=1
+
+ ifconfig ath0 down
+
+ wlanconfig ath0 destroy
+
+ UnloadModules
+
+ echo 0 > /sys/devices/platform/eeepc/wlan
+
+ rmmod pciehp
+
+ fi
+ ;;
+esac
+EOF
+
+###### Webcam #############################################################
+cat > /etc/acpi/actions/camera.sh << EOF
+
+#!/bin/bash
+
+CAMERA=$(cat /sys/devices/platform/eeepc/camera)
+
+ if [[ "$CAMERA" = "0" ]]; then
+ echo 1 > /sys/devices/platform/eeepc/camera
+ else
+ echo 0 > /sys/devices/platform/eeepc/camera
+ fi
+EOF
+
+chmod +x "/etc/acpi/actions/*"
+
+###### Shutdown fix #########################################################
+echo "modprobe -r snd-hda-intel" >> /sbin/halt.local
+chmod 755 /sbin/halt.local
+
+###### Gnome display stuff ##################################################
+
+gconftool-2 --type boolean --set /apps/nautilus/preferences/always_use_browser true \ No newline at end of file