#!/bin/sh


export DISPLAY=:0

case $3 in
	#Sn1
	0000001a)
		/bin/su `who | cut -d " " -f1` -c "firefox" &
		;;
	#SN2
	0000001b)
		/bin/su `who | cut -d " " -f1` -c "thunderbird" &
		;;
	#Sn3
	0000001c)
		/bin/su `who | cut -d " " -f1` -c "skype" &
		;;
	#SN4
	0000001d)
		/bin/su `who | cut -d " " -f1` -c "pidgin" &
		;;
	#Fn+F1
        00000080)
		# echo "Suspend2RAM" > /dev/console
	        #/etc/acpi/suspend2ram.sh
		#/usr/bin/pmsuspend
		;;
	#Fn+F2
	00000010)
		# echo "Wlan an" > /dev/console &
		/etc/acpi/wlan.sh
		;;
	00000011)
		# echo "Wlan aus" > /dev/console &
		/etc/acpi/wlan.sh
		;;
	#Fn+F5
	00000030)
		#echo "LCD" > /dev/console &
		/bin/su `who | cut -d " " -f1` -c "/usr/bin/xrandr --output VGA --off --output LVDS --mode 800x480"
		;;
	00000031)
		#echo "CRT" > /dev/console &
		/bin/su `who | cut -d " " -f1` -c "/usr/bin/xrandr --output VGA --auto --output LVDS --off"
		;;
	00000032)
		#echo "LCD-CRT" > /dev/console &
		/bin/su `who | cut -d " " -f1` -c "/usr/bin/xrandr --output VGA --auto --output LVDS --mode 800x480"
		;;
	#Fn+F6
	00000012)
		# echo "Task Manage On" > /dev/console
		#DISPLAY=:0 su -c "/usr/bin/ksysguard --showprocesses" guest &
		/etc/acpi/overclock.sh
		;;
	#Fn+F7
	00000013)
		# echo "Stummschaltung" > /dev/console &
                amixer set PCM 0%
		;;
	#Fn+F8
	00000014)
		# echo "Leiser" > /dev/console &
		#amixer set PCM 3.20dB-
                /etc/acpi/voldownbtn.sh
		;;
	#Fn+F9
	00000015)
		# echo "Lauter" > /dev/console &
		#amixer set PCM 3.20dB+
		/etc/acpi/volupbtn.sh
		;;
	#Fn+F3
	0000002x)
		#echo "Dunkler" > /dev/pts/0
		;;
	#Fn+F4
	0000002x)
		#echo "Heller" > /dev/pts/0
		;;
esac
