Subject: FVWM: [Q] Binding an FvwmButton to iconify and/or swallow an icon

From: Sam Napolitano <[email-masked]>
Date: Mon, 06 Sep 1999 23:24:16 -0400

Thanks for all your help in setting up FVWM; I'm very close to getting
my environment "right".  Now I'd like to do something a little bit
fancy.

First, I was wondering if there was a way to use FvwmButton to start
an application AND iconify it.  For example, if you have an FvwmButton
that starts Netscape, then:

* if you press it and no Netscape running, a netscape starts
* if you press it and Netscape is running, netscape iconifies
* if you press it and Netscape is running and is iconified, it deiconfies

Basically once the application is started, the button becomes an
"iconify" toggle.  Is this possible?

Similarly, I was wondering if you can have an FvwmButton "swallow" the
icon of a window when it is iconified?  Using the example above, if you 
iconify a netscape then the icon would disappear into the FvwmButton that
started the application, instead of there being a Netscape icon on
your desktop.

Ideally, I would like an FvwmButton to be setup to:

  a) start only one instance of an application
  b) be bound to (de)iconify that application instance
  c) swallow the icon of that application when iconified

Thanks,
Sam
--
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: Mon, 06 Sep 1999 22:04:30 -0700

Previously...
>"iconify" toggle.  Is this possible?

Think so. You should be able to define a function like the following:

AddToFunc Netscape I None Netscape Exec exec netscape -iconic
+                  I Next Netscape Iconify

See the manpage entry for AddToFunc and for Current to get an idea of
how this works.

>  c) swallow the icon of that application when iconified

The swallowing of an icon by FvwmButtons isn't possible, I'm pretty
sure. Sorry.
-- 
[email-masked]                         http://www.best.com/~mikehan/
coffee achiever                              San Francisco, California
"I'm not paid to care." -ASR
--
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: Dominik Vogt <[email-masked]>
Date: Wed, 8 Sep 1999 20:38:52 +0200

> "iconify" toggle.  Is this possible?

Try this:

  AddToFunc StartOrIconifyNetscape
  + I Next (!Netscape*) Exec exec netscape
  + I Next (Netscape) Iconify toggle

This function relies on the fact that netscape takes a while before
the window is created. Otherwise the new window would be immediately
iconified by the second line.  The 'toggle' syntax is new in the
2.3.x betas.  I think the old way to do this was to simply say 'Iconify'.

Bye

Dominik ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
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: [email-masked]
Date: Thu, 09 Sep 1999 11:49:20 -0400

AddToFunc StartOrIconifyNetscape
+ I Next [! Netscape*] Exec exec netscape
+ I Next [Netscape] Iconify

*FvwmButtons(1x10, Title nettoggle, Action StartOrIconifyNetscape)

Thanks; it almost works.  The iconify part works fine, but a new
netscape is always started even if one is already opened.  It's as if
the !Netscape is always ignored.  I'll try a few more things.

Thanks,
Sam

---

From: Brad Giaccio <[email-masked]>
Date: Thu, 9 Sep 1999 12:01:58 -0400

> + I Next [! Netscape*] Exec exec netscape
 + I None [ Netscape*] Exec exec netscape
 
-- 
--- There are two kinds of knowledge, you either know the answer or
			you know where to find it
		      -Kane, Johnson, and anonymous
--
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: Dominik Vogt <[email-masked]>
Date: Thu, 9 Sep 1999 21:28:16 +0200

> + I Next [Netscape] Iconify

My fault. I should be

  AddToFunc StartOrIconifyNetscape
  + I None (Netscape*) Exec exec netscape
  + I Next (Netscape) Iconify toggle

Bye

Dominik ^_^