Re: FVWM: Dynamic Xterm title fix

From: Ron Kellam <ronk_at_hpato.aus.hp.com>
Date: Wed, 19 Jun 1996 09:47:13 +1000 (EST)

Thus spake Jonathan Watson <watson_at_linus.mitre.org>
>
> 1. Any attempt to set an enviornment variable from the -e fails. (ie. setenv
> CONTROLLER 1).
> 2. The .cshrc and shell setup scripts execute AFTER whatever I specify in
> the xterm call with the -e switch.
>
> From these observations an various experiments I thought that if
> I could read the title of the xterm within my .cshrc and use it (the
> title) in an if statement I could then have the cwdcmd changed for that
> specific xterm.
>
> SO, my question is:
> How do you get the title of an xterm from within a shell script??
>
> Any other solutions to this problem??
>

Under ksh I set an env var to lock my console xterm and stop its title getting
changed to the current path - here's some snippets:

I have a script called console with the following line in it:

  LOCK_TITLE=1 xterm -C -bg SteelBlue -n Console -T Console

In the line above, the xterm gets spawned with LOCK_TITLE set to 1. The value
of this var is then checked in the function that sets the xterm title - if
LOCK_TITLE is set, the xterm title doesn't get updated when a dir change
occurs.

Elsewhere is the ksh function:

  function term_title
  {
    if (( ${LOCK_TITLE:=0} == 0 )); then
      label_window $*
      label_icon $*
    fi
  }

Everytime pwd changes, some higher function gets invoked to mash the hostname
and path, and then term_title is called to set the title/icon.

Hopes this help.

Cheers,

Ron

--
Ron Kellam (ron_kellam_at_aus.hp.com)
Australian Telecom Operation
Hewlett Packard Australia
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Tue Jun 18 1996 - 18:51:13 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:59 BST