Re: FVWM: Changing titlebar buttons based on window state?

From: Dominik Vogt <fvwm_at_fvwm.org>
Date: Fri, 6 Sep 2002 10:41:38 +0200

On Thu, Sep 05, 2002 at 09:28:39PM -0500, Len Philpot wrote:
> I have the following defined in my .fvwm2rc :
>
> Mouse 0 1 A Menu Window-Ops2 Close
> Mouse 0 2 A Close
> Mouse 0 4 A Maximize
> Mouse 0 6 A Iconify
>
> # lightning bolt - system menu
> ButtonStyle 1 8 35x15_at_1 20x50_at_1 40x50_at_0 30x80_at_1 75x40_at_0 50x40_at_1 75x15_at_0 35x15_at_1
> # x - Close
> ButtonStyle 2 17 20x20_at_1 30x20_at_1 50x40_at_1 70x20_at_1 80x20_at_1 80x30_at_0 60x50_at_0 80x70_at_1 80x80_at_0 70x80_at_0 50x60_at_0 30x80_at_0 20x80_at_0 20x70_at_0 40x50_at_1 20x30_at_0 20x20_at_1
> # downward triangle - minimize
> ButtonStyle 6 4 50x75_at_1 25x25_at_1 75x25_at_1 50x75_at_0
> # large square - maximize
> ButtonStyle 4 5 25x25_at_1 25x75_at_1 75x75_at_0 75x25_at_0 25x25_at_1
> # small square - restore
> #ButtonStyle 4 5 40x40_at_1 60x40_at_1 60x60_at_0 40x60_at_0 40x40_at_1
>
> (swiped straight from the website and sample files, obviously)
>
> What I want to do is use the small square for button 4 if the window is
> fullscreen and the large square if it's neither fullscreen nor
> iconified. I feel certain this is in the man pages somewhere, but I've
> yet to come across it. I have no idea how to approach this.

It's the default on button 2. If you want the same on another
button you have to tell fvwm about it. Try this:

  ButtonStyle 4 - MWMDecorMax
  AddButtonStyle 4 5 25x25_at_1 25x75_at_1 75x75_at_0 75x25_at_0 25x25_at_1

> I'd still like to work on (which may or may not be doable) :
>
> * How to make windows resizable by dragging on the borders, in
> addition to the corner handles (and disabling moving via borders)

Find the function in your config files that defines the action on
the window borders. You should have something like

  Mouse 1 F N <resize command>
  Mouse 1 S N <move command>

Change this to

  Mouse 1 FS N <resize command>

> * How to make a window truly maximize, rather than stop a few pixels
> short of fullscreen;

Not at all. Windows often define their font size and want to be
resized in multiples of it. The gap is there when the screen size
isn't a multiple of the font size. Just get used to it.

> a nice touch would be to make it _really_
> maximize, with no border showing and no movement possible while
> maximized

There are some commands and styles in 2.5.x that make it possible,
but I don't have the time to check it right now. I think Mikhael
already wrote a setup for this.

> * How to either get FvwmTaskBar to swallow FvwmPager,

The taskbar can't swallow anything.

> or remove the
> border from FvwmPager (there is also some difficulty in getting focus
> to return to a window after using the pager)

  Style FvwmTaskBar HandleWidth 0, BorderWidth 0
 
> * How to remove the biff applet and clock from FvwmTaskBar

The clock can't really be switched off, but can be made to just
print an empty string:

  *FvwmTaskBar: ClockFormat
  *FvwmTaskBar: UpdateInterval 1000000

The second line prevents that the clock is ever updates, saving
some CPU cycles. To turn off the mail indicator:

  *FvwmTaskBar: MailBox None

> * How to remove the title and geometry info from the WindowList menu but
> still have it pop up centered on the screen

Find the WindowList command in your config file. Add the
"NoGeometry" option. You may be using the default Alt-Tab
binding. In this case just put this in your config file:

  Key Tab A M WindowList Root c c NoDeskSort NoGeometry

> * How to prevent the menu selection from automatically following the
> mouse pointer and vice-versa

Use a different window manager ;-) Like it or not, fvwm's menu
handling is tightly coupled with the position of the pointer.
Unless you'd like to spend about a month to change that you can't
do anything about it.

> * How to get vector buttons to appear in a different color than the
> titlebar

This should be possible with colour sets, but I'm not sure if
they work in title buttons. Mikhael?

> * How to make the handles thicker than the border

Not with fvwm.

Bye

Dominik ^_^ ^_^

 --
Dominik Vogt, mail: dominik.vogt_at_schlund.de, phone: 0721/91374-382
Schlund + Partner AG, Erbprinzenstr. 4-12, D-76133 Karlsruhe
--
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 Sep 06 2002 - 03:42:41 BST

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