Subject: FVWM: launch a window maximized ?

From: Johannes Zellner <[email-masked]>
Date: Sun, 23 Jul 2000 19:50:23 +0200

Hello,
How can I lauch an application maximized ?
E.g. I'd like to lauch rxvt always occupying the whole root window ?

-- 
   Johannes
--
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, 23 Jul 2000 11:54:06 -0700

> E.g. I'd like to lauch rxvt always occupying the whole root window ?

Well, either explicitly set the geometry in the commandline for
whatever invocation path you choose (shell alias, in the FVWM Exec
command, etc.), or, if you're using FVWM to invoke rxvt, you could put
together a function like this:

AddToFunc StartMaxRxvt I Exec exec rxvt
+                      I Wait rxvt
+                      I Current (rxvt) Maximize 100 100

I'm not positive that's right, but it certainly is in the right
ballpark. Look at the manpage for more info.
-- 
[email-masked]                            http://www.mikehan.com/
coffee achiever                              San Francisco, California
"If you lend me some money, it'll be my treat."
--
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: Johannes Zellner <[email-masked]>
Date: Sun, 23 Jul 2000 21:56:34 +0200

> whatever invocation path you choose (shell alias, in the FVWM Exec

The problem with specifying the geometry is that it depends on the font.
I could certainly use rxvt -geometry 169x57, but if the font happens to
change (e.g. because I change the X resources) this fails.

> ballpark. Look at the manpage for more info.

I had a look at it. And I had it even before I posted mail initial mail!
I also tried what you proposed (and a few other alternatives). No luck.
Your example toggles the maximize state of an rxvt which is already
on the screen. (E.g. if this window is normal size, it gets maximized,
if it is maximized it gets back it's normal size). The wait returns
immediately if there is already an rxvt on the screen.  I tried also
something like

AddToFunc StartMaxRxvt I Exec exec rxvt -n 'my_name'
+                      I Wait my_name
+                      I Current (my_name) Maximize 100 100

no luck.

I also searched for something like

    Style '*my_name*'  Maximized

but a style `Maximized' does not seem to exist.
hmm. I thought that /must/ be easy. But it doesn't seem so.

---

From: Michael Han <[email-masked]>
Date: Sun, 23 Jul 2000 13:18:43 -0700

> change (e.g. because I change the X resources) this fails.

Yeah, that's a shortcoming.
 
> +                      I Current (my_name) Maximize 100 100

Are you certain Wait isn't waiting for a *new* window? If it doesn't,
then Wait is broken and needs to be fixed (let us know what version
you're running in case you think Wait isn't actually waiting).

If the example doesn't work in the case that my_name is a *unique*
window name in the current context, I'm baffled. If you're saying that
you have multiple "my_name" windows, then perhaps it's the choice of
Current() rather than, maybe Next().
 
> hmm. I thought that /must/ be easy. But it doesn't seem so.

For the time being Maximization is a window state, not a style. It
behaves like Sticky, where you use a function to target a specific
window, rather than a Style that matches some group of windows.
Someday Maximize may become a style, but not any day in the near
future.
-- 
[email-masked]                            http://www.mikehan.com/
coffee achiever                              San Francisco, California
To understand recursion you must first understand recursion.
--
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: Johannes Zellner <[email-masked]>
Date: Mon, 24 Jul 2000 00:01:45 +0200

On Sun, Jul 23, 2000 at 01:18:43PM -0700, Michael Han wrote:

[...]
> Current() rather than, maybe Next().
[...]

yup. It needed two steps to make it work.
    1) doing a cvs update (my `old' version was about 2 months old)
    2) using Next() instead of Current().
thanks!