Example of .titleBar file

# File to manage the title Bar ( titleBar - Version 3.00 ) 
# This should be sourced in the .cshrc file and it defines aliases and 
# shell variables: 
#       fullname - variable with fully qualified hostname 
#       shortname - variable with just the first name of host 
#       toolname - variable with name of tool (e.g. xterm) 
#       header - alias that will set the title bar on window 
#       iheader - alias to change the name on the icon 
#       cwdcmd - alias to be run every time a directory is changed 
#              (This is done autmatically in tcsh, and is done 
#              in csh by redefining the cd command) 
#       rlogin - alias which is the same as rlogin with a cwdcmd on return. 
#       prompt - is set conditional on whether you are in window. 
if $?HOSTNAME then 
   set fullname = $HOSTNAME 
else 
   set fullname = `hostname` 
endif 
set shortname = `echo $fullname | awk -F. '{print $1}'` 

switch ("$term") 
case sun*: 
   set toolname = cmdtool 
#       These commands put the hostname in the title bar when 
#       coming in from a cmdtool or shelltool window. 
alias   header   'echo -n "]l\!*\"' 
alias   iheader  'echo -n "]L\!*\"' 
alias   cwdcmd  'header $shortname":"$cwd ;\\ 
                iheader $shortname'
breaksw 
case *xterm*:
        set toolname = xterm 
#       These commands put the hostname in the title bar when 
#       coming in from a xterm window. 
alias   header  'echo -n "]2;\!*"' 
alias   iheader 'echo -n "]1;\!*"' 
alias   cwdcmd  'header  xterm@$shortname":"$cwd ;\\ 
                iheader $shortname' 
        breaksw 
case *: 
alias   cwdcmd pwd 
endsw 
#       If we are not using a tool then put the host name 
#       in the prompt since it is not on the window 
if ( `echo $SHELL | egrep tcsh` != "" ) then 
  if ($?toolname) then 
    set prompt = "<%\!>% " 
  else 
    set prompt=$shortname"<%\!>% " 
  endif
else 
  if $?toolname then set prompt = "[\!]% " 
  else set prompt=$shortname" set prompt = "<%\!>% " 
  else set prompt=$shortname"<%\!>% " 
  endif
else 
  if $?toolname then 
    set prompt = "[\!]% " 
  else set prompt=$shortname"[\!]% " 
  endif 
#             Simulate the cwdcmd command since it is not built in 
for 
#             csh like it is in tcsh. 
alias cd             'cd \!*; cwdcmd'
endif 
alias rlogin         'rlogin \!*; cwdcmd'

download file