Subject: FVWM: geometries in .fvwm2rc, starting maximized, moving applications

From: Christian Aistleitner <[email-masked]>
Date: Wed, 17 Sep 2003 21:11:26 +0200

Hello,

I have been browsing through the man-page of fvwm for ages.
I searched in the Mailing-list but it did not help me out either.

So the problem is the following:

On my Mandrake 9.1 I have 3 XServers (all of them running fvwm 2.5.7 
WITHOUT Xinerama) at the same time.
But since the monitors attached to the XServers are not all running with 
the same resolutions, it would be fine, not all have the same resolution. 
I use more or less one page for each application. Therefore I want them to 
be maximized right from the start.
Is this possible via Styles? (Ok it would be possible to write a function 
for each application, and then by calling this function the application 
would get started and AFTERWARDS maximized by the function. But I do not 
like this, because of the mess of Functions to create on the one hand, and 
due to the fact, that sometimes I start them from a terminal (and there 
this fvwm-function is not directly accessible.)

So what I was looking for was something like:

Style XTerm StartMaximized

but I could not find anything.
-------------------------------------
This leads to the second question ... geometry. It is possible to set the 
geometry of application via several ways, but I cannot get the most usable 
(for my case) working at all.
Since I use FvwmButtons on my second display, I do not want the 
applications Maximized there. I want them a bit less than maximized. Just 
as big, such that I can see/use all buttons. But on the first display the 
application should be as large as the resolution is. Same for the third 
display.
Since fvwm allows different files for different displays, it would be fine 
to have the geometry in the Styles section of my config-files.
But I just cannot get this sorted out. I tried tons of things, but all 
sorts of different syntax for

Style XTerm Geometry: 10x10+0+0

did not work. How to write this correctly? (Meanwhile I have written a 
script for the applications I use more often, which checks the value of 
$DISPLAY an then sets the parameters correctly. But I'd prefer to have 
this in the fvwm configuration.)
-------------------------------------
And finally the third question, which is probably not directly related to 
this: Moving applications. First of all, let me remind you, that I do NOT 
use Xinerama. On the one hand it slows down my system dramatically. (I was 
mean while told, that this is due to my second graphic card, which is 
probably too old and cheap in order to be useable with Xinerama.) On the 
other I recon it to be a more productive environment, when not having to 
fiddle around with Stickyness of Windows in order not to loose them when 
switching Pages on other displays.
But now for the question.
What I want to is to move an application from :0.0 COMPLETELY to :0.1
So I have running maple running on :0.0 . Then when pleased with the 
results I want them to write down in emacs. emacs also runs on :0.0 . So 
either make both applications fit on one page (or make the sticky, 
stayontop, whatever), or save the file in Maple. Start maple on :0.1 and 
load the saved file, in order to see both applications at the same time.

I was told, that xmove (a pseudo XServer) should deal with such problems, 
but after compiling and setting up, it never showed any windows (not only 
in fvwm, but also in IceWM. And I got reports, that IceWM is capable of 
doing xmove-things. So it not a problem of fvwm -- its a problem of me 
getting xmove to run at all.)

But as fvwm has SO many things included by itself, and since I want to 
move the application from an fvwm-managed XServer to another fvwm-managed 
XServer (notably both on the same machine) I thought, that there maybe 
something hidden somewhere in fvwm, that might assist me.
Probably not, but if I would not have asked, I'd propably hate myself for 
not asking, if there was something :-D

Of course I know that it is not good, to have three questions in one email 
to a list, but 2 of them are really closely connected -- and well the 
third just dropped in be, lets say by ... mistake.

Best regards and keep up the good work,
Christian Aistleitner
--
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: Wed, 17 Sep 2003 21:35:57 -0400

> Style XTerm StartMaximized

Xterm understands X resources.

I use rxvt instead of xterm, but a similar approach would work
for xterm.
Here is what I use to force rxvt to almost full screen height
(font matters too):

#if ( HEIGHT == 900 )
Rxvt.geometry: 80x55
#elif ( HEIGHT == 1024 )
Rxvt.geometry: 80x65
#elif ( HEIGHT == 768 )
Rxvt.geometry: 80x47
#else                     /* I have no idea... */
Rxvt.geometry: 80x40
#endif

"HEIGHT" is defined by xrdb which loads the xresources.

Fvwm sets variables for the screen dimensions which can
be used in Piperead for this kind of thing.

-- 
Dan Espen                           E-mail: [email-masked]

---

From: Thomas Adam <[email-masked]>
Date: Thu, 18 Sep 2003 09:52:25 +0100 (BST)

--- Dan Espen <[email-masked]> wrote: > Christian Aistleitner
> "HEIGHT" is defined by xrdb which loads the xresources.

I'd be more inclined to add it in "~/.Xresources" (often symlinked to
~/.Xdefaults).

-- Thomas Adam

=====
Thomas Adam

"The Linux Weekend Mechanic" -- www.linuxgazette.com

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk
--
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: Thomas Adam <[email-masked]>
Date: Thu, 18 Sep 2003 09:52:25 +0100 (BST)

-- Thomas Adam

=====
Thomas Adam

---

From: Dan Espen <[email-masked]>
Date: Thu, 18 Sep 2003 07:33:38 -0400

> I'd be more inclined to add it in "~/.Xresources" (often symlinked to

When you put things in ~/.Xdefaults doesn't xrdb still do the loading?

I used to use .Xdefaults, but I found that it got out of control
because it was too big.

Now I have this in my .xinitrc:

  cat $HOME/xdef/*.ad | xrdb -load

And I have a bunch of X.ad files in ~/xdef.

---

From: Thomas Adam <[email-masked]>
Date: Thu, 18 Sep 2003 12:49:45 +0100 (BST)

--- Dan Espen <[email-masked]> wrote: > Thomas Adam
> And I have a bunch of X.ad files in ~/xdef.

Yeah, i mean there's nothing wrong with you doing that, although I
question your command above. "cat" will display the contents, surely
something like:

``
for i in $(ls -1 $HOME/xdef/*.ad); do xrdb -merge $i; done
''

would be better? Or am I missing something?

-- Thomas Adam

=====
Thomas Adam

---

From: Dan Espen <[email-masked]>
Date: Thu, 18 Sep 2003 08:22:35 -0400

> would be better? Or am I missing something?

"ls" isn't necessary.

for i in $HOME/xdef/*.ad; do xrdb -merge $i; done

would eliminate the multiple invocations of ls.

But that leaves the multiple invocations of xrdb.

There's no need to do the files one at a time
cat'ing them all together and putting them on xrdb's stdin
seems better to me.

---

From: Christian Aistleitner <[email-masked]>
Date: Thu, 18 Sep 2003 17:31:23 +0200

Hello again,

> Xterm understands X resources.

Thats true. A already got such things working before. I just did not 
mention it, since I really want to use FVWMs capabilites for doing such 
things.

X resources are not the way I want to go, because I do not think that it 
is good, to have configs for applications spread throughout the system. 
(That is having defined Stickyness in .fvwm2rc (or some include), while 
the geometry is set via a completely different (from the user point of 
view)mechanism -- namely X resources.) On the other hand I only used XTerm 
to name some application. Indeed I want to do this for more than one 
application. And not all of them support X resources. (And begging the 
authors of the software for X resource support is NOT the way to go)

> #else                     /* I have no idea... */

would not help either, because :0.1 is of Height 600 ... but you have to 
subtract the FvwmButtons Height. :0.2 is also of Height 600, but without 
the FvwmButtons. Ok it can be managed to get this working with X resources.
But actually, as I already said in my initial mail, and again in this one: 
I am really looking for an FVWM-way, to express the geometry.
Especially since lots of applications do not care about X resources. (Or I 
am not able to get them working the way I want them too.)
--
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: Thu, 18 Sep 2003 11:50:02 -0400

> mention it, since I really want to use FVWMs capabilites for doing such 

Then see my other comment about PipeRead and Fvwm variables that give
screen dimensions.

I don't have any examples but question 7.14 in the FAQ will provide
some clues.

---

From: Christian Aistleitner <[email-masked]>
Date: Thu, 18 Sep 2003 18:27:48 +0200

> I don't have any examples but question 7.14 in the FAQ will provide

Look, as I said, I already have the thing up and running. Via skripts and 
functions, that pass the apropriate values. This works. But I think that 
these are cumbersome and was therefore looking for some simple Style 
command, that would allow me to enter fixed values for the geometry in one 
line. Since I split up the config files for each display, to get the 
desired values for the geometry is not the problem.

The only point is "How to get the geometry in a single Style command?" 
(Not in functions, X resources, scripts or whatever. Since I already know 
how these things work, as I tried them out (and use them))

This does not exist AFAIK. And indeed I just wanted to know, if it really 
does not exist, or I just cannot find it. But since no one just came here 
and said "This is the way to do such things with Styles" ...
So I guess it just is not implemented in fvwm. Thats ok.

Thanks for your time and effort.

Best regards,
Christian Aistleitner

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 18 Sep 2003 19:53:14 +0300

> but I could not find anything.

The FAQ answer 3.18 suggests several solutions. You don't like to create
functions for all applications, so don't use this approach. But you may
use FvwmEvent that maximizes all xterms and maybe some other apps when
they are launched. This way you may start apps from the command line too.

It seems you want to use "Maximize 100 grow" or "Maximize 0 -80p" to
solve your FvwmButtons problem.

Are you sure you want to start any xterm maximized (I would dislike this),
maybe just setup a binding like Alt-F10 to maximize/unmaximize any
focussed window?

Regards,
Mikhael.