home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.ultrix
- Path: sparky!uunet!sun-barr!decwrl!pa.dec.com!nntpd2.cxo.dec.com!nntpd.lkg.dec.com!news!dcoleman
- From: dcoleman@acoustic.aosg.gsf.dec.com (David M. Coleman AOSG)
- Subject: Re: Q: escape sequences to modify dxterm title?
- Message-ID: <1992Nov17.214958.9727@aosg.gsf.dec.com>
- Keywords: xterm dxterm escape codes
- Sender: usenet@aosg.gsf.dec.com (USENET News System)
- Nntp-Posting-Host: acoustic.aosg.gsf.dec.com
- Organization: AOSG
- References: <1992Nov16.105312.19054@Informatik.TU-Muenchen.DE>
- Date: Tue, 17 Nov 1992 21:49:58 GMT
- Lines: 42
-
- In article <1992Nov16.105312.19054@Informatik.TU-Muenchen.DE>, kirschnt@Informatik.TU-Muenchen.DE (Torsten R. Kirschner) writes:
- |> can anybody tell me whether there are xterm-like escape sequences to
- |> modify a dxterm's titlebar string dynamically??
-
- Here's a csh script that'll work with either xterm or dxterm:
-
- #!/bin/csh
- #
- # dtitle - Set title for terminal window and icon
- #
-
- set window_title = $1
- set icon_title = $2
- if (${icon_title} == "") then
- set icon_title = $window_title
- endif
-
- #
- # xterm title
- #
- set esc = ""
- set ctrl_G = ""
- set do_window = 2
- set do_icon = 1
-
- set title_window = "${esc}]${do_window};${window_title}${ctrl_G}"
- set title_icon = "${esc}]${do_icon};${icon_title}${ctrl_G}"
- set title_xterm = "${title_window}${title_icon}"
-
- #
- # dxterm title
- #
- set osc = "¥"
- set st = "£"
- set title_dxterm = "${osc}21;${window_title}${st}${osc}2L;${icon_title}${st}"
-
- if ($TERM == "xterm") then
- echo "Setting xterm title ... " ${title_xterm}
- else
- echo "Setting xterm title ... " ${title_xterm} \
- " or dxterm title ..." ${title_dxterm}
- endif
-