xorg: add default configuration for synaptic touchpads
This commit is contained in:
parent
db4cba9c24
commit
2fde43c3bc
1
Makefile
1
Makefile
@ -139,6 +139,7 @@ dist-rpm: dist
|
|||||||
echo "and saved as \`$$rpm_sourcedir/$(dist_archive)'"
|
echo "and saved as \`$$rpm_sourcedir/$(dist_archive)'"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
find . -name *~ -exec rm {} \;
|
||||||
rm -f $(dist_archive)
|
rm -f $(dist_archive)
|
||||||
rm -f $(pck_catalogs:.po=.mo)
|
rm -f $(pck_catalogs:.po=.mo)
|
||||||
rm -f $(PACKAGE).lang
|
rm -f $(PACKAGE).lang
|
||||||
|
@ -107,10 +107,10 @@ _EOF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function xorg_d_configure_keyboard() {
|
function xorg_d_configure_input() {
|
||||||
# Keyboard configuration (Xorg >= 1.8 uses /etc/X11/xorg.conf.d)
|
# Keyboard configuration (Xorg >= 1.8 uses /etc/X11/xorg.conf.d)
|
||||||
[ ! -e /etc/X11/xorg.conf.d/10-keyboard.conf -o \
|
[ ! -e /etc/X11/xorg.conf.d/10-keyboard.conf -o \
|
||||||
/etc/sysconfing/keyboard -nt /etc/X11/xorg.conf.d/10-keyboard.conf ] && {
|
/etc/sysconfig/keyboard -nt /etc/X11/xorg.conf.d/10-keyboard.conf ] && {
|
||||||
|
|
||||||
if [ ! "$XKB_MODEL" -o ! "$XKB_LAYOUT" ]; then
|
if [ ! "$XKB_MODEL" -o ! "$XKB_LAYOUT" ]; then
|
||||||
case "${LANG:0:2}" in
|
case "${LANG:0:2}" in
|
||||||
@ -159,6 +159,21 @@ __EOF
|
|||||||
rm /etc/X11/xorg.conf.d/15-keyboard-apple.conf
|
rm /etc/X11/xorg.conf.d/15-keyboard-apple.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
[ ! -e /etc/X11/xorg.conf.d/20-synaptics.conf ] && {
|
||||||
|
cat > /etc/X11/xorg.conf.d/20-touchpad.conf << __EOF
|
||||||
|
Section "InputClass"
|
||||||
|
Identifier "touchpad defaults"
|
||||||
|
Driver "synaptics"
|
||||||
|
Option "RTCornerButton" "2"
|
||||||
|
Option "HorizEdgeScroll" "true"
|
||||||
|
Option "TapButton1" "1"
|
||||||
|
Option "TapButton2" "2"
|
||||||
|
Option "TapButton3" "3"
|
||||||
|
Option "HorizScrollDelta" "0"
|
||||||
|
MatchIsTouchpad "on"
|
||||||
|
EndSection
|
||||||
|
__EOF
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# (re)create the '/tmp/.ICE-unix' directory with the right permissions
|
# (re)create the '/tmp/.ICE-unix' directory with the right permissions
|
||||||
@ -218,7 +233,7 @@ if [ ! -e $XORGCONF ]; then
|
|||||||
HOME=/tmp Xorg :5 -configure 2>>$logfile || {
|
HOME=/tmp Xorg :5 -configure 2>>$logfile || {
|
||||||
logmsg "$me" "warning: xorg autoprobed configuration failed; enabling experimental xorg autoconfig"
|
logmsg "$me" "warning: xorg autoprobed configuration failed; enabling experimental xorg autoconfig"
|
||||||
xorg_configure_loginmanager
|
xorg_configure_loginmanager
|
||||||
xorg_d_configure_keyboard
|
xorg_d_configure_input
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -501,7 +516,7 @@ sed -i "/[[:space:]]*InputDevice[[:space:]]*.*PS2Mouse.*/d; \
|
|||||||
sed -i "/\W*Option \"Device\".*/d" $XORGCONF
|
sed -i "/\W*Option \"Device\".*/d" $XORGCONF
|
||||||
|
|
||||||
# Configure keyboard
|
# Configure keyboard
|
||||||
xorg_d_configure_keyboard
|
xorg_d_configure_input
|
||||||
|
|
||||||
# disable keyboard configuration for Xorg >= 1.4
|
# disable keyboard configuration for Xorg >= 1.4
|
||||||
sed -i "s|^\([[:space:]]*InputDevice\W*\"Keyboard0\".*\)|#\1|" $XORGCONF
|
sed -i "s|^\([[:space:]]*InputDevice\W*\"Keyboard0\".*\)|#\1|" $XORGCONF
|
||||||
|
Loading…
Reference in New Issue
Block a user