Subject: FVWM: WindowID $0 (h < 20) close_netscape_win

From: Elliot Sowadsky <[email-masked]>
Date: Tue, 16 Jan 2001 10:47:00 -0800 (PST)

Would be nice if we could do

Current/Next/WindowID/etc (x/y/width/height </> number) op
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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: Mikhael Goikhman <[email-masked]>
Date: Tue, 16 Jan 2001 14:17:53 -0600

> Current/Next/WindowID/etc (x/y/width/height </> number) op

For complex expressions you may use shell/awk/expr/perl. Try in 2.3.19+:

Key P W CM Current (Netscape*) PipeRead `[ $[w.width] -lt 210 ] && echo Close`

Now press Ctrl-Alt-P in any window. Only if you are in a netscape window
and its width is less than 210, the window will be closed. That you want.

Regards,
Mikhael.

---

From: Elizabeth Schwartz <[email-masked]>
Date: Tue, 16 Jan 2001 15:29:54 -0500

When I open an xterm, I am explicitly specifying Title and name with xterm 
-T host1 -n host1

If I ssh to another host from that xterm, after some seemingly random 
interval, the xterm title and name are changing to the name of the new 
host. Or, worse, sometimes just to "${HOST}" (minus the quotation marks)

What causes this behavior, and HTH can I turn it OFF? If I name a window 
"host1" I want it to stay named "host1" no matter *what* I do inside the 
window.

Is this an fvwm thing or an xterm thing?

thanks for any clues
Betsy
--
Elizabeth Schwartz                          781-262-6565
Unix System Administrator                   [email-masked]
Genuity, Inc

---

From: Perry Hutchison <[email-masked]>
Date: Tue, 16 Jan 2001 12:41:24 -0800 (PST)

> Is this an fvwm thing or an xterm thing?

Xterm is involved, but I suspect it's mostly a shell thing.  There
are some escape sequences which can be sent to an xterm, asking it
to change its window title.  It sounds to me as if your .profile
/ .login / .bashrc / whatever is set up to use one of these escape
sequences to set the xterm title to the name of whatever host you've
logged into.

In principle, a window manager is entitled to ignore such hints
from xterm and/or other apps.  In practice, I don't know of any
way to tell FVWM to do that.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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: Dan Espen <[email-masked]>
Date: Tue, 16 Jan 2001 15:40:47 -0500

> Is this an fvwm thing or an xterm thing?

Its an xterm thing.

By printing an escape sequence within the xterm you can change the
title of the xterm.

For example, I use ksh.  I export ENV=$HOME/.kshrc.

In my .kshrc I have:

set -o trackall
set -o ignoreeof
set -o nolog
case $- in
*i*)    #interactive ksh
  function shdr	{		# changes screen title
    print -n '\033]2;'$*'\07'
  }
  function chdir  {		# fancy change directory...
    'cd' $*
    case $TERM in
      *xterm*|ansi|rxvt)
		     #     shdr "$USER @ $SYSID -- $PWD"
		     shdr "$SYSID -- $PWD"
		     PS1="`colorcyan`$sysid`colormagenta`>`colorreset` "
		     ;;
      linux)
		     PS1="`colorcyan`$sysid`coloryellow`>`colorreset` "
		     ;;
		   ;;
    esac
  }
  alias cd=chdir
  ;;
esac

This makes any "cd" change the title of the xterm.
Look for something similar in your setup.

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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: Rainer Koehler <[email-masked]>
Date: Tue, 16 Jan 2001 12:47:02 -0800

> Is this an fvwm thing or an xterm thing?

Sounds like an xterm/shell thing to me.

Applications can send control sequences to xterm to change various
things, including the title of the window.

Some users (including me) like to have the hostname and path in the
xterm title.  I have the following in my .cshrc:

if ($TERM == "xterm") then
    #
    # display host and path in the titel bar of xterm-windows
    #
    alias cwdcmd 'echo -n "]2;${HOST}:$cwd]1;${HOST}"'
    cwdcmd
endif

("cwdcmd" is a special alias that is called when tcsh changes the
current directory.)

Search for something similar in your .cshrc/.login/.bashrc/.whatever
file.

Hope this helps,
Rainer

---

From: Erik Steffl <[email-masked]>
Date: Tue, 16 Jan 2001 13:50:45 -0800

> "host1" I want it to stay named "host1" no matter *what* I do inside the

  it can be the program you are running, for example the vim changes the
title to VIM - filename, mc (midnight commander) also change the title,
it puts the hint there (IIRC it's configurable)

  it most probably is not xterm itself, nor fvwm. It is either in shell
startup files (like other posts suggested) or the program you are
running. Probably.

	erik

---

From: Elizabeth Schwartz <[email-masked]>
Date: Wed, 17 Jan 2001 16:00:32 -0500

Thanks to everyone who replied! THere was indeed an escape sequence, buried 
inside the .login file inside a switch statement...d'oops!

What I'm actually doing here is taking a look at our default dot files that 
are distributed to new users, trying to dig out from several generations of 
accumulated cruft. There's all sorts of weird stuff in here.

(I'm also having to make them compatible with two different generations of 
fvwm installed in two different places....)
thanks Betsy