#!/bin/sh
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/usr/X11R7/lib/X11/xinit/Xresources
sysmodmap=/usr/X11R7/lib/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge -nocpp $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f $userresources ]; then
xrdb -merge -nocpp $userresources
fi
if [ -f $usermodmap ]; then
xmodmap $usermodmap
fi
#0.9.9 new xvesa-dslg2 doesn't need this...
#if [ -f /usr/X11R7/bin/Xvesa ];then
# #note, /etc/mousebuttons is created in /usr/X11R7/bin/xwin.
# if [ -f /etc/mousebuttons ];then #puppy v0.8.6
# if [ "`cat /etc/mousebuttons`" = "5" ];then
# #fixes problem wheel scrolling backwards...
# xmodmap -e 'pointer = 1 2 3 5 4'
# fi
# fi
#fi
if [ -f /usr/X11R6/bin/XF86_SVGA ];then #0.9.9
xmodmap -e "keycode 22 = BackSpace"
xmodmap -e "keycode 107 = Delete"
fi
CURRENTWM="`cat /etc/windowmanager`"
if [ "$CURRENTWM" = "startkde" ];then
exec startkde
fi
#0.9.8 sync cut-buffers and clipboard. only useful for older apps
#such as rxvt that use the cut-buffers...
/usr/bin/autocutsel &
#...disadvantage of this is it creates a little square bottom-right of screen.
#rxvt &
if [ -e /tmp/videomode ];then #testing a video mode
video-wizard &
fi
agenda_chk &
#v1.0.7 set by xrandrshell, part of xorg wizard...
if [ -f /etc/xrandrindex ];then
XRANDRINDEX="`cat /etc/xrandrindex`"
[ ! "$XRANDRINDEX" = "0" ] && xrandr -s $XRANDRINDEX
fi
if [ -f /root/.xset.sh ];then
#this is created by /usr/X11R6/bin/gxsetshell...
eval "/root/.xset.sh"
else
#Xorg has it's own fontpath settings in /etc/X11/xorg.conf...
if [ ! "`readlink /usr/X11R7/bin/X`" = "Xorg" ];then
xset fp+ /usr/X11R7/lib/X11/fonts/Type1/
xset fp+ /usr/X11R7/lib/X11/fonts/TTF/
fi
xset s 600 600 s blank
fi
#v1.0.7 also see /etc/rc.d/rc.local0
if [ -f /root/.fonts/fonts.dir ];then
xset fp+ /root/.fonts/
fi
xsetroot -cursor_name top_left_arrow
##new background setter created by mu...
#/usr/local/Puppybackground/puppybackgroundmenu saved &
#/usr/sbin/fixPuppyPin /root/Choices/ROX-Filer/PuppyPin #v1.0.7
#rox -o -p /root/Choices/ROX-Filer/PuppyPin
#v2.13 now using rox 2.5...
rox1="`rox -v 2>&1 |grep 'Filer 1'`"
rox2="`rox -v 2>&1 |grep 'Filer 2'`"
if [ "$rox1" != "" ];then
/usr/local/Puppybackground/puppybackgroundmenu saved &
/usr/sbin/fixPuppyPin /root/Choices/ROX-Filer/PuppyPin #v1.0.7
rox -o -p /root/Choices/ROX-Filer/PuppyPin
fi
if [ "$rox2" != "" ];then
/usr/sbin/fixPuppyPin /root/Choices/ROX-Filer/PuppyPin #v1.0.7
rox -o -p /root/Choices/ROX-Filer/PuppyPin
if [ ! -f /root/Choices/ROX-background.jpg ];then
setrox2backdrop /usr/share/backgrounds/default.jpg
fi
fi
##v1.0.5
#if [ -f /usr/local/kde/bin/kdeinit ];then
# /usr/local/kde/bin/kdeinit &
#fi
#v2.0.0
/usr/sbin/delayedrun &
#v2.01 hide cursor when not moving... (setup in /usr/sbin/input-wizard)
if [ -f /etc/mousehide ];then
IDLETIME="`cat /etc/mousehide | cut -f 1 -d ','`"
[ ! "$IDLETIME" = "0" ] && unclutter -idle $IDLETIME &
fi
##v2.14 rarsa: update xdg menu for w.m. that do not allow includes...
#which ${CURRENTWM}_menu_refresh && ${CURRENTWM}_menu_refresh
#...no, now doing it differently, see /usr/sbin/fixmenus
#v2.15 disovered by GuestToo...
[ "`which glipper`" != "" ] && glipper &
#exec $CURRENTWM
#v2.11 GuestToo suggested this improvement...
which $CURRENTWM && exec $CURRENTWM
[ -x $CURRENTWM ] && exec $CURRENTWM
exec jwm
###END###