Re: FVWM: Dynamic Xterm title fix

From: Chris Taylor <shaggy_at_ctron.com>
Date: Tue, 18 Jun 1996 16:55:54 -0400 (EDT)

> 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.

This is more a shell/X problem than an fvwm problem.

I'm not familiar with tcsh, but cwdcmd sounds similar to the precmd() function
in Z Shell. Mine looks like this:

    precmd () {
            print -Pn "^[]0;${XTERMNAME}%M %l %5.^G"
    }

This yields a string in the titlebars and icons of my xterms that looks like
"belldandy p1 ~" (hostname, tty, current directory).

The XTERMNAME variable is the trick here. Normally it's unset. For my console
xterm (I have a setup like Jon's for session control), I use this in my
.xsession:

    XTERMNAME="CONSOLE: " xterm +ut -C -fn 5x8

Then my titlebar looks like "CONSOLE: belldandy p1 ~". Since I set the
variable right before I run the xterm, it doesn't get propagated to subshells.
I can also use it for other kinds of xterms, if needed.

I don't know how you'd do this in tcsh. The % macros used in zsh's print
command won't be the same, but the use of XTERMNAME should be similar.

Chris Taylor / My views do not represent \ PGP public key available
shaggy_at_ctron.com \ those of Cabletron. / via keyserver or request

--
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 - 15:57:34 BST

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