Subject: FVWM: CLIENT_MACHINE for Style attributes?

From: Brian Servis <[email-masked]>
Date: Sun, 13 Jun 1999 11:06:01 -0500 (EST)

Is it possible to use a window's CLIENT_MACHINE for Style attributes.
I often have shells opened up on several different hosts, all with their
DISPLAY set to my local machine.  It would be great to be able to use
the StartsOn[Desk|Page] property to constrain the windows from those
hosts to certain desktops.  This is especially true when I am running
the same app on the different hosts and thus the windows all have the
same NAME, CLASS and RESOURCE strings.

Thanks,

-- 
Brian 
---------------------------------------------------------------------
Mechanical Engineering                              [email-masked]
Purdue University                   http://www.ecn.purdue.edu/~servis
---------------------------------------------------------------------

--
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: Michael Han <[email-masked]>
Date: Sun, 13 Jun 1999 09:32:13 -0700

Previously...
>same NAME, CLASS and RESOURCE strings.

This kind of enhancemant has considered in the past. I don't remember
what came of the conversation last time.

In the meantime, I take it that the window title get set by the app
you run, e.g. VIM sets the xterm title to "VIM -- /path/to/file". This
is what you mean? Why not just open these xterms with the -t flag as
in

xterm -lservis -title foohost -e [rlogin/ssh] foohost

and style match the arbitrary string you set? This is what I do from
home using the following bits from my .fvwm2rc:

+ "Shell&7%mini.xterm.xpm%" \
  Exec exec xterm -fn \
  '-b&h-lucidatypewriter-medium-r-normal-sans-17-*-100-100-*' \
  -title Shell7 -geometry 80x40 \
  -e ssh -l mikehan shell7.ba

Style "Shell7" UseStyle Netscape, Icon penguin.xpm, StartsOnPage 0 1 1

The Style line matches the title when the window got mapped. What
happens after that, FVWM could care less (unless you do a recapture).
-- 
[email-masked]
"Bewitched" does not promote Satanism
 - The collected wisdom of Bart Simpson
--
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: Brian Servis <[email-masked]>
Date: Sun, 13 Jun 1999 11:39:22 -0500 (EST)

*- On 13 Jun, Michael Han wrote about "Re: FVWM: CLIENT_MACHINE for Style attributes? "
> home using the following bits from my .fvwm2rc:

Unfortunately it is not that simple.  I run other apps like MATLAB,
ANSYS, etc that have lots of windows(transients) popping up & down all
the time and I can not set their titles individually for each machine. 
The only difference between them is CLIENT_MACHINE resource.

---

From: Brian Servis <[email-masked]>
Date: Sun, 13 Jun 1999 12:14:27 -0500 (EST)

*- On 13 Jun, Brian Servis wrote about "FVWM: CLIENT_MACHINE for Style attributes?"
> same NAME, CLASS and RESOURCE strings.

As I was think about this, I thought about something that could come in
handy when defining Style attributes.  It would great if the Style
attributes could be defined individually or globally for each of the
windows NAME, CLASS, RESOURCE and MACHINE strings.  What I mean is that
say I want all windows with a windowname of 'transient' to have NoTitle
but those same windows from CLIENT_MACHINE='remote' to StartIconic.
Under the current implementation I don't think this is possible(Correct
me if I am wrong).  So perhaps the windowname could be either a single
quoted string for the global case or sets of quoted strings(no spaces
between), one for the windowname and one for the string to match
against. An example:

# no second quote immediately after the windowname means global
Style "transient"  NoTitle
# a second quoted pair immediately after the windowname means apply 
# only to the window with client string matching "remote" 
Style "transient""client""remote"  StartIconic
# If there are an even pair then the first of the pair is the string and
# second is the windowname to match.
Style "client""remote" StartOnDesk 2

This enhancement, if added, would be backwards compatible since a lack
of a additional quoted strings would mean apply to all windows matching
the windowname as is the case now.

Just a thought, send to /dev/null if you want,

---

From: Adam Rice <[email-masked]>
Date: Sun, 13 Jun 1999 20:03:43 +0100

> the windowname as is the case now.

AFAIK, this would break the parser. I would prefer a syntax something like

Style "ICON=xclock" StartIconic
Style "TITLE=Netscape:*" StartsOnDesk 26
Style "MACHINE=nsahost" Decor ThoughtPolice

This is similar to what is done by FvwmIconMan, and would resolve a lot of
the ambiguity inherent in the current system. OTOH, given the kind of
complex logic some people seem to want, it might be better to have a
facility to set styles from a module, then you could have a module
programmable to do things like

if (ICON=xclock && MACHINE=sping) Decor AtlanticTime, NoHandles

But perhaps that would be pushing it.

-- 
Adam Rice -- [email-masked] -- Blackburn, Lancashire, England

---

From: Dan Espen <[email-masked]>
Date: Sun, 13 Jun 1999 21:12:39 -0400

> But perhaps that would be pushing it.

This was designed to death a while back.  fvwm2  uses '[]' notation in
other contexts.  This is probably in the todo list.  From memory, this
seemed to be best:

Style [ ICON xterm, TITLE hosta ] NoHandles

--
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: Brian Servis <[email-masked]>
Date: Sun, 13 Jun 1999 21:25:03 -0500 (EST)

*- On 13 Jun, Dan Espen wrote about "Re: FVWM: CLIENT_MACHINE for Style attributes? "
> Style [ ICON xterm, TITLE hosta ] NoHandles

I like this better, much cleaner and intuitive.  I was just putting my
initial thoughts out.  I was pointed to the discussion in the archive
of Dec.'98 and found that it was also in the enhancments list. 

I wish I knew enough C to make a contribution....someday.