# xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
EndSection

Section "InputDevice"
	Identifier	"MacBook Keyboard"
	Driver		"kbd"
	Option		"CoreKeyboard"
	Option		"XkbRules"	"xorg"
	Option		"XkbModel"	"macbook79"
	Option		"XkbLayout"	"fr"
#	Option		"XkbVariant"	""
	Option		"XkbOptions"	"lv3:rwin_switch,apple:badmap"
EndSection

Section "InputDevice"
	Identifier	"Synaptics Touchpad"
	Driver		"synaptics"
	Option		"SendCoreEvents"	"true"
	Option		"Device"		"/dev/psaux"
	Option		"Protocol"		"auto-dev"
	Option		"HorizScrollDelta"	"0"
        Option          "SHMConfig"             "true"
        Option          "TouchpaddOff"          "0"

        # Location of the touchpad edges, somewhat sane values
        # that I found by testing. Xmin=0, Xmax=1216, Ymin=0,Ymax=387
        Option          "LeftEdge"              "100"
        Option          "RightEdge"             "1116"
        Option          "TopEdge"               "50"
        Option          "BottomEdge"            "310"
        
        # Touch and "untouch" thresholds
        Option          "FingerLow"             "25"
        Option          "FingerHigh"            "50"
        
        # We DO NOT want palm triggering middle/right mouse
        # button events, so a tap has to be quite fast
        Option          "MaxTapTime"            "100"
        Option          "MaxTapMove"            "100"
        Option          "MaxDoubleTapTime"      "200"

	# How fast the two-finger scrolling scrolls. The lower, the faster.
        Option          "VertScrollDelta"       "25"
        Option          "HorizScrollDelta"      "25"

        # Enable vertical (right) edge scrolling with one finger
        Option          "VertEdgeScroll"        "1"
        # Enable horizontal (bottom) edge scrolling with one finger
        Option          "HorizEdgeScroll"       "1"

	# Disable two finger scrolling, 
	# as we have the edge scrolling enabled already
        Option          "VertTwoFingerScroll"   "0"
        Option          "HorizTwoFingerScroll"  "0"

        # Right top corner of the touchpad shall be the middle mouse button
	# Right bottom corner shall be the right mouse button
        Option          "RTCornerButton"        "2"
        Option          "RBCornerButton"        "3"

        # Disable left top & left bottom corners
        Option          "LTCornerButton"        "0"
        Option          "LBCornerButton"        "0"

        # Fast taps
        Option          "FastTaps"              "1"

        # Disable tapping of the touchpad (excluding the corners, of course)
        Option          "TapButton1"            "0"
        Option          "TapButton2"            "0"
        Option          "TapButton3"            "0"

        # Movement speed settings
        Option          "MinSpeed"              "0.5"
        Option          "MaxSpeed"              "0.9"
        Option          "AccelFactor"           "0.35"

        # Palm detection. Does not seem to work on Macbook
        Option          "PalmDetect"            "1"
        Option          "PalmMinWidth"          "10"    #1-15
        Option          "PalmMinZ"              "200"   #1-255

        # Various other variables
        Option          "UpDownScrolling"       "0"
        Option          "LeftRightScrolling"    "0"
EndSection

Section "InputDevice"
	Identifier 	"Mighty Mouse"
	Driver		"evdev"
	Option		"SendCoreEvents"		"true"
	Option		"Name" "Apple Computer, Inc. Mighty Mouse"
	Option		"HWHEELRelativeAxisButtons"	"7 6"
	Option		"WHEELRelativeAxisButtons"	"4 5"
EndSection

Section "InputDevice"
	Identifier	"USB Mouse"
	Driver		"mouse"
	Option		"SendCoreEvents"	"true"
	Option		"Device"		"/dev/input/mice"
	Option		"Protocol"		"ImPS/2"
	Option		"Emulate3Buttons"	"true"
EndSection

Section "Device"
	Identifier	"Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller"
	Driver		"intel"
#	BusID		"PCI:0:2:0"
EndSection

Section "Monitor"
	Identifier	"MacBook monitor"
	Option		"DPMS"
#	HorizSync	28-64
#	VertRefresh	43-60
EndSection

Section "Screen"
	Identifier	"Default Screen"
	Device		"Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller"
	Monitor		"MacBook monitor"
	DefaultDepth	24
	SubSection "Display"
		Modes		"1280x800"
	EndSubSection
EndSection

Section "ServerLayout"
	Identifier	"Default Layout"
	Screen		"Default Screen"
	InputDevice	"MacBook Keyboard"
	InputDevice	"Synaptics Touchpad"
	InputDevice	"Mighty Mouse"
	InputDevice	"USB Mouse"
EndSection
