home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / ultrix / 8337 < prev    next >
Encoding:
Text File  |  1992-11-16  |  2.6 KB  |  68 lines

  1. Newsgroups: comp.unix.ultrix
  2. Path: sparky!uunet!mcsun!sunic!ugle.unit.no!alf.uib.no!dsfys1.fi.uib.no!iversen
  3. From: iversen@dsfys1.fi.uib.no (Per Steinar Iversen)
  4. Subject: Re: Q: escape sequences to modify dxterm title?
  5. Message-ID: <1992Nov16.120730.15077@alf.uib.no>
  6. Keywords: xterm dxterm escape codes
  7. Lines: 53
  8. Sender: iversen@vsfys1.fi.uib.no (Per Steinar Iversen)
  9. Reply-To: iversen@vsfys1.fi.uib.no
  10. Organization: Department of Physics, University of Bergen, Norway
  11. References:  <1992Nov16.105312.19054@Informatik.TU-Muenchen.DE>
  12. Date: Mon, 16 Nov 92 12:07:30 GMT
  13. Lines: 53
  14.  
  15.  
  16. In article <1992Nov16.105312.19054@Informatik.TU-Muenchen.DE>, kirschnt@Informatik.TU-Muenchen.DE (Torsten R. Kirschner) writes:
  17.  
  18. >Dear fellow netters,
  19. >
  20. >can anybody tell me whether there are xterm-like escape sequences to
  21. >modify a dxterm's titlebar string dynamically??
  22. >
  23. >I have a neat line in my .kshrc that works with xterms (I have replaced
  24. >the control chars to make it through the news), which I would like to
  25. >work with dxterms, too:
  26. >
  27. >export SHWIN_NAME=$HOST
  28. >PS1='ESCAPE]2;$SHWIN_NAME ${PWD}CONTROL-GESACPE]1;$SHWIN_NAMECONTROL-G
  29. >> '
  30. >
  31. >Replace ESCAPE with the ^[-char, and CONTROL-G with the ^G-char to check
  32. >it out. The line feed is intentional.
  33. >
  34. >Any help to get this to work with dxterm would be gratefully appreciated.
  35. >Thanks in advance...
  36. >
  37. >Torsten
  38. >--
  39. >Torsten R. Kirschner            DOMAIN: torki@mpipf-muenchen.mpg.dbp.de
  40. >Christoph-Probst-Str. 8/818        FAX: +49 89 342473
  41. >8000 Muenchen 40                  HOME: +49 89 3234102
  42. >
  43.  
  44. I picked this up from the net last year sometime, I keep it in my .cshrc for
  45. use by tcsh:
  46.  
  47. if ($?prompt) then
  48.   if ($?tcsh) then
  49.      if ($term == xterm || $term == xterms || $term == xterml) then
  50.         set prompt="%{\e]2\;%m:%/^g\e]1\;%m^g\r%}%B`hostname`>%b "
  51.      endif
  52.      if ($term == vt300 && $?DISPLAY ) then
  53.         set prompt="%{\e]21\;%m:%/\e\\\e]2L;%m\e\\%}%B`hostname`>%b "
  54.      endif
  55.   endif
  56. endif
  57.  
  58. This works well enough most of the time, though I am sure it could be improved.
  59.  
  60. +------------------------------------------------------------------------------+
  61. ! Per Steinar Iversen    ! Internet:     iversen@vsfys1.fi.uib.no              !
  62. ! Fysisk Institutt       ! BITnet:       iversen@cernvm.bitnet                 !
  63. ! Universitetet i Bergen ! HEPnet:       VSFYS::IVERSEN (VSFYS=21.341=21845)   !
  64. ! Allegaten 55           ! Phone:       +47 5212770                            !
  65. ! N-5007 Bergen          ! Fax:         +47 5318334                            !
  66. ! NORWAY                 !                                                     !
  67. +------------------------------------------------------------------------------+
  68.