Subject: FVWM: FVWM Buttons

From: "Reuben D Budiardja" <[email-masked]>
Date: Mon, 17 Dec 2001 08:12:26 -0500

Hello,
I have a newbie questions. So, I'll get to the points:
1. I know FVWM buttons can swallow apps. But can it swallow every apps? or is 
there somekind of limitations/requirements? 
2. How can I make my own buttons (something like png or xpm file) and use it 
as FVWM buttons? I asked this long time ago, and someone suggested to read 
the manual, but I can't find the answer to this (or probably I just didn't 
really understand what I read).

I learned best probably by example, so if someone would like to send me 
example (or even rc files + screenshot off list), that'd be great too. I love 
FVWM because it's so configurable. Too bad I still have not mastered the 
config. I am using fvwm2-4.3

thanks in advance.
Reuben D. Budiardja
--
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: Mon, 17 Dec 2001 14:05:33 +0100

> there somekind of limitations/requirements? 

In theory you can swallow every application window.  Some
applications might not like to be confined to a very small button,
though.

> really understand what I read).

Use the 'Icon' option in the button definition (see example
below).  You have to use xpm images - png is not supported by fvwm
and its modules.

> config. I am using fvwm2-4.3

This is the example from the FvwmButtons man page:

----------------------------- snip -------------------------
# Make it titlebar-less, sticky, and give it an icon
Style "FvwmButtons"	Icon toolbox.xpm, NoTitle, Sticky

*FvwmButtons: Font        5x7
*FvwmButtons: Back rgb:90/80/90
*FvwmButtons: Fore        black
*FvwmButtons: Frame       1
# 9x11 pixels per button, 4x4 pixels for the frame
*FvwmButtons: Geometry    580x59+0-0
*FvwmButtons: Rows        5
*FvwmButtons: Columns     64
*FvwmButtons: BoxSize     fixed
*FvwmButtons: Padding     1 1

# Pop up a module menu directly above the button.
*FvwmButtons: (9x1+3+0, Padding 0, Title "Modules",   \
  Action `Menu Modulepopup rectangle $wx$h+$l+$t o+50 -100m`)

# first row of buttons from left to right:
*FvwmButtons: (3x2+0+1, Icon my_lock.xpm, Action `Exec xlock`)
*FvwmButtons: (3x2+3+1, Icon my_recapture.xpm, Action Recapture)
*FvwmButtons: (3x2+6+1, Icon my_resize.xpm, Action Resize)
*FvwmButtons: (3x2+9+1, Icon my_move.xpm, Action Move)
*FvwmButtons: (3x2+12+1, Icon my_fvwmconsole.xpm,     \
  Action 'Module FvwmConsole')

# second row of buttons from left to right:
*FvwmButtons: (3x2+0+3, Icon my_exit.xpm, Action QuitSave)
*FvwmButtons: (3x2+3+3, Icon my_restart.xpm, Action Restart)
*FvwmButtons: (3x2+6+3, Icon my_kill.xpm, Action Destroy)
*FvwmButtons: (3x2+9+3, Icon my_shell.xpm, Action 'Exec rxvt')

# big items
*FvwmButtons: (10x5, Swallow (NoKill, NoCLose)        \
  "FvwmPager" 'FvwmPager * * -geometry 40x40-1024-1024')
*FvwmButtons: (6x5, Swallow "FvwmXclock" `Exec xclock \
  -name FvwmXclock -geometry 40x40+0-3000 -padding 1  \
  -analog -chime -bg rgb:90/80/90`)
*FvwmButtons: (13x5, Swallow (NoClose)                \
"FvwmIconMan" 'Module FvwmIconMan')
*FvwmButtons: (20x5, Padding 0, Swallow "xosview"     \
  `Exec /usr/X11R6/bin/xosview -cpu -int -page -net   \
  -geometry 100x50+0-3000 -font 5x7`)
----------------------------- snip -------------------------

Bye

Dominik ^_^  ^_^

-- 
Dominik Vogt, email: [email-masked]
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
--
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: Tenebrae <[email-masked]>
Date: Mon, 17 Dec 2001 06:36:44 -0800 (PST)

> really understand what I read).

I used a marble image from the gtk+ marble theme to make the background of
my buttons match:

# Pixmap on buttons to match marble GTK theme - MDM 
*FvwmButtonsPixmap marble.xpm

I also had a friend of mine make a cute fish icon for xv and used Gimp to
make it transparent:

*FvwmButtons(Title xview, Icon xfish.xpm, \
             Action 'Exec "xv" xv &')

Oh, and I used The Gimp to convert both to .xpm while I was at it.

> config. I am using fvwm2-4.3

My crappy screenshot is up at:

http://www.fvwm.org/screenshots/

This was when I was using FVWM 2.2.4, but it looks like this part still
works in 2.4.3.

I noticed Dominik's example from the FvwmButtons man page looks a bit
different from my old format:

*FvwmButtons: (Title Xcalc, Icon rcalc.xpm,                 \
                    Action `Exec "Calculator" xcalc &`)

vs. my entry:

*FvwmButtons(Title xcalc, Icon calculator.xpm, \
             Action 'Exec "Calculator" xcalc &')

Dominik et al, should I go through and add a colon to all my FvwmButtons
entries?  It looks like it works now without them, and the man pages have
no comment on the mysterious colon apearance.
I also noticed the use of ` vs. ' which the man pages seem to indicate
doesn't really matter unless you're using a preprocessor like FvwmCpp
which I'm not so I should be fine with those...right?
								-Tenebrae.

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 17 Dec 2001 16:15:33 +0000

> no comment on the mysterious colon apearance.

  % man fvwm2
  /MODULE COMMANDS

I enhanced the syntax with a colon separator to avoid name conflicts.
The old syntax is still supported. Also search for "colon" in NEWS file.

It was a short signed decision in the past not to use any delimiter
between a module name and a module config resource. Adding a support for
aliases only worsen the situation. Anyone activelly using module aliases
sooner or later comes to name conflict problems with the old syntax.
The new syntax using a colon avoids any conflicts (i.e. a config resource
is never messed up with a module name since there is a delimiter).

The old module config syntax is:

  *FvwmModuleConfigDirective Parameters

The ideal module config syntax (in theory) would be:

  @ FvwmModule ConfigDirective Parameters

The new module config syntax (while keeping compatibility) is:

  *FvwmModule: ConfigDirective Parameters

I would suggest to use a new syntax, which is also more readable.

> which I'm not so I should be fine with those...right?

All 3 quote chars ("), (') and (`) are functionaly equivalent (the same
char is used for starting and ending quote). You may use all 3 to write
complex nested strings. Backquotes are good with PipeRead and other shell
strings, where the string itself does not contain a backquote, but may
contain a single or double quote. Preprocessors (FvwmM4 and FvwmCpp) are
another story, they use their own starting and ending quote chars.

Regards,
Mikhael.

---

From: "Reuben D Budiardja" <[email-masked]>
Date: Tue, 18 Dec 2001 09:13:05 -0500

On Monday 17 December 2001 08:05 am, you wrote:
> > 1. I know FVWM buttons can swallow apps. But can it swallow every apps?
> > or is there somekind of limitations/requirements?
>
> > 2. How can I make my own buttons (something like png or xpm file) and use
> > it as FVWM buttons? I asked this long time ago, and someone suggested to
> > read the manual, but I can't find the answer to this (or probably I just
> > didn't really understand what I read).
>

But this just make the background of the button the xpm image. I can't really 
change the button itself, can I? I mean, if my image is circle, can I get a 
circle button? 

Thanks.
Reuben D. Budiardja