Re: FVWM: centering windows

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Fri, 26 Jul 2002 21:59:23 +0000

On 26 Jul 2002 15:29:55 -0600, Toshi Isogai wrote:
>
> I want to center windows (of various size) in a page.
> Isn't there a command to calculate window size and screen
> size in order to position it at center and middle?

Here is a function for this usage: Next (MyWindow) CenterWindow

  DestroyFunc CenterWindow
  AddToFunc CenterWindow
  + I ThisWindow Piperead "echo Move \
    $(( $[vp.width]/2-$[w.width]/2 ))p \
    $(( $[vp.height]/2-$[w.height]/2 ))p"

ThisWindow may be removed, it is only needed to avoid errors when
CenterWindow is called without a window context.

> I would search in mail archive if there was a search engine
> in fvwm.org....

Yes, this request about centering a window was answered several times...

Regards,
Mikhael.
--
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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Fri Jul 26 2002 - 17:00:22 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:53 BST