home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / windows / openloo / 4394 < prev    next >
Encoding:
Text File  |  1992-11-08  |  1.3 KB  |  49 lines

  1. Newsgroups: comp.windows.open-look
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!purdue!yuma!oldfield!freedman
  3. From: freedman@oldfield.colostate.edu (keith freedman)
  4. Subject: Re: path in title bar
  5. Sender: news@yuma.ACNS.ColoState.EDU (News Account)
  6. Message-ID: <Nov06.175637.75036@yuma.ACNS.ColoState.EDU>
  7. Date: Fri, 06 Nov 1992 17:56:37 GMT
  8. Reply-To: freedman@oldfield.colostate.edu
  9. References: <1992Nov6.022528.27362@xilinx.com>
  10. Nntp-Posting-Host: oldfield.cs.colostate.edu
  11. Organization: Sun Microsystems, Inc.
  12. Lines: 35
  13.  
  14.  
  15. This shell script changes the X-Term title bar.
  16. The -i option changes the icon title, the
  17. -t option changes the window title, -b
  18. changes both to the same string!
  19.  
  20. I use -b $HOSTNAME and then -i $PATH
  21.  
  22.  
  23. #!/bin/csh -f
  24. # cshell script to change the title on an xterm window and/or its icon.
  25. if ( $#argv != 2 ) then
  26.    /bin/echo "Usage: xtitle { -t | -i | -b } string"
  27.    exit
  28. endif
  29.  
  30. set ESC=""
  31. set ND=";"
  32. set NP=""
  33. if ( "$1" == "-t" ) then
  34.    /bin/echo -n "${ESC}]2${ND}$2${NP}"
  35. else if ( "$1" == "-i" ) then
  36.    /bin/echo -n "${ESC}]1${ND}$2${NP}"
  37. else if ( "$1" == "-b" ) then
  38.    /bin/echo -n "${ESC}]0${ND}$2${NP}"
  39. else
  40.    /bin/echo "Usage: xtitle { -t | -i | -b } string"
  41. endif
  42.  
  43. ---
  44. Keith Freedman
  45. Colorado State University
  46. Department of Computer Science
  47. Systems Administration
  48.  
  49.