home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / windows / x / apps / 1852 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  1.2 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!ncar!hsdndev!dartvax!news
  2. From: Andy.Behrens@coat.com
  3. Newsgroups: comp.windows.x.apps
  4. Subject: Re: Setting icon title for an xterm
  5. Message-ID: <C189xD.9yp@dartvax.dartmouth.edu>
  6. Date: 21 Jan 93 23:44:00 GMT
  7. References: <C17oFA.Hq2@cs.uiuc.edu>
  8. Sender: wendell@coos.dartmouth.edu
  9. Organization: Dartmouth College, Hanover, NH
  10. Lines: 33
  11.  
  12. schwager@mike.cs.uiuc.edu (Mike Schwager) writes:
  13. > How would I set the icon title for an xterm, from that xterm.  I already
  14. > know how to reset the titlebar title ...
  15.  
  16. The following script lets you change the titlebar, the icon name, or
  17. (the default behavior) both at once.
  18.  
  19. Examples:
  20.     titlebar New Name
  21.     titlebar -n New IconName
  22.     titlebar -T New Title
  23.  
  24. ============================== CUT HERE ==============================
  25. #! /bin/sh
  26.  
  27. # titlebar - sets titlebar and icon name
  28.  
  29. param=0
  30.  
  31. esc=` echo X | tr X '\033' `
  32. bel=` echo X | tr X '\007' `
  33.  
  34. case "$1" in
  35.   -n | -icon[nN]ame)
  36.         param=1; shift ;;
  37.   -T | -title)
  38.         param=2; shift ;;
  39.   -*)
  40.         echo >&2 'usage: titlebar [-T | -n] text'; exit 1 ;;
  41. esac
  42.  
  43. echo "${esc}]${param};$*${bel}"
  44. ============================== CUT HERE ==============================
  45.