#!/bin/csh
# standard BSD (os = SunOS OSF1 ULTRIX Unix)
if (-f /bin/uname) then
        set     host = `uname -n | cut -f1 -d.`
        set     os = `uname -s`
else
	set     host = `/bin/hostname`
	set     host = $host:r
	set     host = $host:r
	set	os = Unix
endif

set	path = (/usr/local/gnu/bin /usr/local/{ucb,bin,games,etc,sbin} /usr/{local,ucb,bin,games,etc,sbin} /bin /etc /sbin .)
set	manpath = (/usr/man:/usr/local/man)
set	xhome = (/usr/local/X)

# windows, libraries and paths
switch ($os)
case SunOS:
	set	manpath = (${manpath}:/usr/X/man)
	set	path = (/usr/lang ${xhome}/bin $path)
	setenv  CDROM /dev/rsr0
	switch	($host)
	case solaris:
                set     path = (/opt/SUNWspro/bin /usr/ccs/bin /usr/ccs/lib $path .)
		setenv  LD_LIBRARY_PATH /usr/lib:/usr/ucbli
		breaksw
	case grundoon:
		setenv  OPENWINHOME /grundoon/openwin
		setenv	LD_LIBRARY_PATH ${xhome}/lib
		breaksw
	default:
		setenv	OPENWINHOME /userg/openwin3
		setenv  LD_LIBRARY_PATH ${xhome}/lib
		breaksw
	endsw
	breaksw
case Unix:
	set	path = (${xhome}/bin $path)
	setenv  LD_LIBRARY_PATH ${xhome}/lib
#	resize	>/dev/null
	breaksw
case ULTRIX:
        set     path = (/usr/local/audio/bin.mips ${xhome}/bin $path)
        setenv  LD_LIBRARY_PATH ${xhome}/lib
        setenv  AUDIOFILE ${host}:0
        setenv  CDROM /dev/rz6c
case OSF1:
	set	path = (/usr/local/audio/bin.alpha ${xhome}/bin $path)
	setenv  LD_LIBRARY_PATH ${xhome}/lib
	setenv	AUDIOFILE ${host}:0
	setenv	CDROM /dev/rz4c
endsw

#general
setenv	MANPATH $manpath
setenv  HOST $host
setenv  DISPLAY ${host}:0
setenv	SIGNATURE "Dave Mills"
setenv  EDITOR vi
setenv	ENVSET true

# standard csh parameters
if	($?prompt) then
	set     history=150
	set	timefmt="%E %Uuser %Ssys %P;  %I+%O I/O;  %Fpf, %Rre, %Wsw"
	set	time=(1 "$timefmt")
	unset	timefmt
endif

# user specifics
switch	($home)
default:
	if	($?prompt) then
		set	prompt = "${HOST}:${cwd}> "
	endif
	breaksw
endsw

# aliases...
alias	cd	'chdir \!* ; set prompt = "${HOST}:${cwd}> "'
alias	d	'dirs'
alias   h	'history | tail -22'
alias   hh	'history | more'
alias	la	'ls -as \!*'
alias	ll	'ls -ls \!*'
alias	lg	'ls -lsga \!*'
alias   p	'pushd \!*'
alias   P	'popd  \!*'
alias	printenv	'printenv \!* | cat -v'
alias	sus	'suspend'
alias	user	'rwho -a | grep \!*'
alias	u	'ruptime \!*'
alias	cdrom	'mount -dr $CDROM /mnt'
