Subject: FVWM: Changing the xterm title bar label

From: Mark Valery <[email-masked]>
Date: Wed, 7 Feb 1996 15:47:01 -0500

How do I go about changing the label on an existing xterm titlebar
from within that xterm?
I'm running 2.0p38

Also, does anybody know if its possible to change the code that
does the titlebar labeling to accept the mwm commands.
I ask because the application that we primarily run here is 
cadence. Cadence will update the mwm titlebar if you push down into the
hierarchy of the layout to match the cell that is currently being
edited.
-----------------------------------------------------------------------
Mark Valery                        |  Internet: [email-masked]
Unitrode Integrated Circuits Corp. |  Fax     : (US) 603-429-8564
Merrimack, NH  USA                 |  Voice   : (US) 603-429-8923 (day)

--
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked]
Date: Thu, 8 Feb 1996 00:04:44 -0600 (CST)

>From your shell use
% echo -n "^[]2;{whatever string you want}^G"

Ron

---

From: Steve Passe <[email-masked]>
Date: Thu, 08 Feb 1996 00:07:49 -0700

Hi,

I use the following with ksh to track the system & current directory:

 function cd
 {
        builtin cd $1 $2; echo -n "\033]2;`hostname`:$PWD\007"
 }

--
Steve Passe		| powered by
[email-masked]	|            FreeBSD

---

From: Richard Lister <[email-masked]>
Date: Thu, 08 Feb 1996 12:29:03 +0000

On Wed, 7 Feb 1996 15:47:01 -0500
Mark Valery <[email-masked]> 
> How do I go about changing the label on an existing xterm titlebar

You need to use xterm escape sequences (listed in a file called ctlseqs.ms
which comes with the xterm distribution). For bash I do something like the
following in my shell startup file:

	IDNAME="`whoami`"
	ESC="\033"
	TITLESTRING="\[${ESC}]0;${IDNAME}@\h\]"

	PS1="${TITLESTRING}\\$ "

This puts the string "username@machine_name" into the title bar. Putting
the escapes in my prompt means it is updated on rlogins, etc.

Ric

 ~~~~~~~~~~~~~~ Richard J. Lister    [email-masked] ~~~~~~~~~~~~~~~~
            Research Assistant, Neural Computing Research Group
                  Aston University, Birmingham B4 7ET, UK
 ~~~~~~~~~~~~~~~~~ http://www.ncrg.aston.ac.uk/~listerrj/ ~~~~~~~~~~~~~~~~~~

---

From: <[email-masked]> (Charles Hines)
Date: Thu, 8 Feb 1996 09:10:44 -0500

>>>>> "Mark" == Mark Valery <[email-masked]> writes:

Mark> How do I go about changing the label on an existing xterm titlebar
Mark> from within that xterm?

Since several people have already answered this, I won't bother.

Mark> I'm running 2.0p38

The latest 2.xx beta is 2.0.40, BTW.

Mark> Also, does anybody know if its possible to change the code that
Mark> does the titlebar labeling to accept the mwm commands.

What do you mean MWM commands to change the titlebar?  If the program
uses standard methods for changing the window name, the titlebar
should be updated correctly.

Mark> I ask because the application that we primarily run here is
Mark> cadence. Cadence will update the mwm titlebar if you push down into the
Mark> hierarchy of the layout to match the cell that is currently being
Mark> edited.

Unfortunately I don't have a copy of Cadence, so I can't test this.
But as I said above, it should work.  Use FvwmIdent to see if the
window name is changing correctly even if the titlebar isn't.

Chuck

---

From: [email-masked] (Sean Kelly)
Date: Thu, 8 Feb 1996 09:09:45 -0700

>>>>> "Steve" == Steve Passe <[email-masked]> writes:

    Steve> Hi, I use the following with ksh to track the system &
    Steve> current directory:

    Steve>  function cd { builtin cd $1 $2; echo -n
    Steve> "\033]2;`hostname`:$PWD\007" }

And if you're a tcsh-aficionado:

        if ($term == xterm) then
                set prompt="%{\e]2\;%m:%~^g\e]1\;%m^g\r%}%B%m %h %#%b "
        else
                set prompt="%m %h %# "
        endif

-- 
Sean Kelly
NOAA Forecast Systems Laboratory, Boulder Colorado USA

A good way to keep a mob of peasants from killing your monster is when they
break into your castle, make them be real quiet, then open a door and there's
the monster, sound asleep.  -- Deep Thoughts, by Jack Handey
--
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: "Brandon M. Browning" <[email-masked]>
Date: Thu, 8 Feb 1996 17:04:42 -0800 (PST)

>                 set prompt="%{\e]2\;%m:%~^g\e]1\;%m^g\r%}%B%m %h %#%b "

Alternately (found this by looking in the tcsh man page.  Guess what?  It
explains on how to do the very question asked...):

   if ($term == xterm) then
	alias cwdcmd 'echo -n "\033]2;${HOST}:$cwd\007\033]1;${HOST}\007"'
   endif

I couldn't get ^[ to work, but escaping works for me.  What's cwdcmd? 

<snip>

       Tcsh now supports a special alias, cwdcmd,  which  if  set
       holds  a  command that will be executed after changing the
       value of $cwd.  For example, if the user is running on  an
       X  window  system xterm(1), and a re-parenting window man-
       ager that supports title bars such as twm(1) and has done:

             > alias cwdcmd  'echo -n "^[]2;${HOST}:$cwd ^G"'

       then  the  shell  will  change  the  title  of the running
       xterm(1) to be the name of the host, a colon, and the full
       current  working  directory.

-- Brandon Browning                                                            )
   Student System Administrator at Pacific University                         (
   http://tardis.pacificu.edu/~browninb/                                     c[]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"The sky was full of stars and every star an exploding ship...one of ours."
	-- Sinclair (re: The Line), "The Gathering"
--
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].