#!/bin/sh
# File: .xinitrc
# Authors: Doug Edwards
#          K.R. Sloan
# Last Modified: 26 September 1990
# Purpose: Script for starting up client programs in X;
#          read by xinit;
#

host=`hostname`
userresources=$HOME/.Xresources
usermodmap=$HOME/.xmodmaprc
sysresources=/usr/lib/X11/xinit/.Xresources
sysmodmap=/usr/lib/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $userresources ]; then
    xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    xmodmap $usermodmap
fi

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

# start some nice programs

xrdb -load $HOME/.Xresources

# first, a window manager
/wd/bin/X11/twm &

# a nice background
xsetroot -bg white -fg black -bitmap .Xbitmap -cursor left_ptr left_ptrmsk &

# a mail reader - just an xterm for me
xterm -iconic -n Mail -title Mail -geometry =80x68+300+0 &

# a couple of pre-defined xterms
xterm -iconic -n `hostname|sed 's/\\..*//'` -title `hostname`  -geometry =80x68+0+0 &

xterm -iconic -n `hostname|sed 's/\\..*//'` -title `hostname`  -geometry =80x68+500+0 &

# accessories
xclock -geometry -0+0 &
xbiff  -geometry 60x60-30-30 &

# establish standard color maps
# and display a neato image
# but, wait for all of the set-up to  go by first
(sleep 20; StandardMaps -c) &
(sleep 40; StandardMaps -g) & 
(sleep 60; zcat .wff | XShow -r) &

# and last (note the missing &), the Console
# to terminate the X session - simply exit from the Console window
xterm -iconic -j -ut -C -T Console -rw -sb -ms black -cr wheat -n Console -title Console -geometry 90x7+0+0

#                                  -30- 
