- remove DOS line endings

- add some more gconf stuff
This commit is contained in:
Fabian Affolter 2008-12-13 13:59:59 +01:00
parent c9c032f54f
commit 04ec7b3a3d

View File

@ -1,153 +1,164 @@
###### Eee PC 900 stuff #################################################### ###### Eee PC 900 stuff ####################################################
# #
###### Hotkeys ############################################################# ###### Hotkeys #############################################################
cat > /etc/acpi/actions/hotkeys.sh << EOHOTKEY cat > /etc/acpi/actions/hotkeys.sh << EOHOTKEY
#!/bin/bash #!/bin/bash
export DISPLAY=:0 export DISPLAY=:0
case "$3" in case "$3" in
#Fn+F2 #Fn+F2
00000010) 00000010)
# Wlan On # Wlan On
/etc/acpi/actions/wlan.sh poweron /etc/acpi/actions/wlan.sh poweron
;; ;;
00000011) 00000011)
# Wlan Off # Wlan Off
/etc/acpi/actions/wlan.sh poweroff /etc/acpi/actions/wlan.sh poweroff
;; ;;
#Fn+F6 #Fn+F6
00000012) 00000012)
# Webcam switch # Webcam switch
/etc/acpi/actions/camera.sh /etc/acpi/actions/camera.sh
# TaskManager # TaskManager
# /usr/bin/gnome-system-monitor # /usr/bin/gnome-system-monitor
;; ;;
#Fn+F7 #Fn+F7
00000013) 00000013)
# Volume mute # Volume mute
/usr/bin/amixer set -D hw:0 Master toggle /usr/bin/amixer set -D hw:0 Master toggle
;; ;;
#Fn+F8 #Fn+F8
00000014) 00000014)
# Volume down # Volume down
/usr/bin/amixer set -D hw:0 Master 10%- unmute /usr/bin/amixer set -D hw:0 Master 10%- unmute
;; ;;
#Fn+F9 #Fn+F9
00000015) 00000015)
# Volume up # Volume up
/usr/bin/amixer set -D hw:0 Master 10%+ unmute /usr/bin/amixer set -D hw:0 Master 10%+ unmute
;; ;;
#Fn+F5 #Fn+F5
00000030) 00000030)
/usr/bin/xrandr --output VGA --mode 1024x768 \ /usr/bin/xrandr --output VGA --mode 1024x768 \
--output LVDS --off --output LVDS --off
if [[ "$?" != "0" ]]; then if [[ "$?" != "0" ]]; then
/usr/bin/xrandr --output VGA --preferred \ /usr/bin/xrandr --output VGA --preferred \
--output LVDS --off --output LVDS --off
fi fi
;; ;;
00000031) 00000031)
/usr/bin/xrandr --output LVDS --mode 800x480 \ /usr/bin/xrandr --output LVDS --mode 800x480 \
--output VGA --mode 800x600 --output VGA --mode 800x600
;; ;;
00000032) 00000032)
/usr/bin/xrandr --output VGA --off \ /usr/bin/xrandr --output VGA --off \
--output LVDS --preferred --output LVDS --preferred
;; ;;
*) *)
logger "ACPI hotkey $3 action is not defined" logger "ACPI hotkey $3 action is not defined"
;; ;;
esac esac
EOHOTKEY EOHOTKEY
###### WLAN ############################################################# ###### WLAN #############################################################
cat > /etc/acpi/actions/wlan.sh << EOF cat > /etc/acpi/actions/wlan.sh << EOF
#!/bin/bash #!/bin/bash
PWR=$(cat /sys/devices/platform/eeepc/wlan) PWR=$(cat /sys/devices/platform/eeepc/wlan)
UnloadModules() { UnloadModules() {
rmmod ath_pci rmmod ath_pci
rmmod ath_rate_sample rmmod ath_rate_sample
rmmod wlan_scan_sta rmmod wlan_scan_sta
rmmod wlan_tkip rmmod wlan_tkip
rmmod wlan_wep rmmod wlan_wep
rmmod wlan rmmod wlan
} }
LoadModules() { LoadModules() {
modprobe ath_pci modprobe ath_pci
} }
case $1 in case $1 in
poweron) poweron)
if [[ "$PWR" = "0" ]]; then if [[ "$PWR" = "0" ]]; then
modprobe pciehp pciehp_force=1 modprobe pciehp pciehp_force=1
echo 1 > /sys/devices/platform/eeepc/wlan echo 1 > /sys/devices/platform/eeepc/wlan
rmmod pciehp rmmod pciehp
fi fi
;; ;;
poweroff) poweroff)
if [[ "$PWR" = "1" ]]; then if [[ "$PWR" = "1" ]]; then
modprobe pciehp pciehp_force=1 modprobe pciehp pciehp_force=1
ifconfig ath0 down ifconfig ath0 down
wlanconfig ath0 destroy wlanconfig ath0 destroy
UnloadModules UnloadModules
echo 0 > /sys/devices/platform/eeepc/wlan echo 0 > /sys/devices/platform/eeepc/wlan
rmmod pciehp rmmod pciehp
fi fi
;; ;;
esac esac
EOF EOF
###### Webcam ############################################################# ###### Webcam #############################################################
cat > /etc/acpi/actions/camera.sh << EOF cat > /etc/acpi/actions/camera.sh << EOF
#!/bin/bash #!/bin/bash
CAMERA=$(cat /sys/devices/platform/eeepc/camera) CAMERA=$(cat /sys/devices/platform/eeepc/camera)
if [[ "$CAMERA" = "0" ]]; then if [[ "$CAMERA" = "0" ]]; then
echo 1 > /sys/devices/platform/eeepc/camera echo 1 > /sys/devices/platform/eeepc/camera
else else
echo 0 > /sys/devices/platform/eeepc/camera echo 0 > /sys/devices/platform/eeepc/camera
fi fi
EOF EOF
chmod +x "/etc/acpi/actions/*" chmod +x "/etc/acpi/actions/*"
###### Shutdown fix ######################################################### ###### Shutdown fix #########################################################
echo "modprobe -r snd-hda-intel" >> /sbin/halt.local echo "modprobe -r snd-hda-intel" >> /sbin/halt.local
chmod 755 /sbin/halt.local chmod 755 /sbin/halt.local
###### Gnome display stuff ################################################## ###### Gnome display stuff ##################################################
gconftool-2 --type boolean --set /apps/nautilus/preferences/always_use_browser true gconftool-2 --set /apps/nautilus/preferences/desktop_font --type string "Sans 8"
gconftool-2 --set /desktop/gnome/interface/document_font_name --type string "Sans 8"
gconftool-2 --set /desktop/gnome/interface/font_name --type string "Sans 8"
gconftool-2 --set /apps/metacity/general/titlebar_font --type string "Sans Bold 8"
gconftool-2 --set /desktop/gnome/interface/monospace_font_name --type string "Monospace 8"
gconftool-2 --set /apps/metacity/window_keybindings/toggle_fullscreen --type string "<Alt>F11"
gconftool-2 --set /desktop/gnome/interface/toolbar_style --type string "icons"
gconftool-2 --set /desktop/gnome/sound/default_mixer_tracks --type list --list-type string "[PCM]"
gconftool-2 --set /apps/gnome-power-manager/notify/low_capacity --type bool 0
gconftool-2 --set /apps/compiz/plugins/move/allscreens/options/constrain_y --type bool 0
gconftool-2 --set /apps/panel/toplevels/top_panel_screen0/size --type integer 19
gconftool-2 --set /apps/panel/toplevels/bottom_panel_screen0/size --type integer 19