Subject: FVWM: Fvwm.themes.org stuff...

From: John Anderson <[email-masked]>
Date: Sun, 07 Mar 1999 20:51:51 -0800

Hello,

This is Cobalt from over at fvwm.themes.org.  I am working on a new
method for fvwm themes.  This newer version has dynamic menus and
background switcher.  I have two questions.  First, is it possible to
have an Exec command and a Restart Fvwm2 command for the same menu item,
like "+ bleh Exec blah Restart Fvwm2"? If not, how would I accomplish
this same task.  I know that the preceding syntax is incorrect, as I
tried it.  The second is this:  Is it possible to have the menus changed
on the fly w/o a restart?  I am using PipeRead now to change menus,
however this is annoying because it takes a restart for the menus to
change.  I would like them to change whenever the menu is opened, if
that is possible.

Also, If anyone has suggestions of what features should go into this
themeing mechanism, please tell me, I would hate to put something on
fvwm.themes.org that was not the best.  Right now, it has dynamic (as
above) menus and theme switching, background switching and tarball
extraction.. also, it sports a better way of organization.

Thanks,
John Anderson (Cobalt)
[email-masked]
fvwm.themes.org

--
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: [email-masked] (Paul D. Smith)
Date: 08 Mar 1999 01:44:44 -0500

%% John Anderson <[email-masked]> writes:

  ja> This is Cobalt from over at fvwm.themes.org.  I am working on a new
  ja> method for fvwm themes.  This newer version has dynamic menus and
  ja> background switcher.  I have two questions.  First, is it possible to
  ja> have an Exec command and a Restart Fvwm2 command for the same menu item,
  ja> like "+ bleh Exec blah Restart Fvwm2"? If not, how would I accomplish
  ja> this same task.

Can't you write a function that contains these two commands, then
execute that for the menu item?

  ja> The second is this: Is it possible to have the menus changed on
  ja> the fly w/o a restart?  I am using PipeRead now to change menus,
  ja> however this is annoying because it takes a restart for the menus
  ja> to change.  I would like them to change whenever the menu is
  ja> opened, if that is possible.

No, I don't think that's possible.  Fvwm doesn't provide any "hook" when
a menu is opened where you could insert an action.

However, you don't need a restart; I modify menus all the time without
restarting.  For example, I put a "*Rescan*" menu item on the menu that
does a PipeRead; the trick is that the first command read should be a
DestroyMenu to get rid of the old menu, otherwise you'll get the info
duplicated.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email-masked]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
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: Jim Nicholson <[email-masked]>
Date: Mon, 8 Mar 1999 08:56:19 -0500 (EST)

Every now and then I think about putting together a themes managment
package for fvwm2. I've disliked most of the approaches I've seen
other take for this. What some folks call a "theme" is really just
window border and menu decorations; other times, a "theme" is a
complete desktop look and feel.

One thing I've been trying to do lately is isolate the individual
components of my desktop configuration into separate files. What I'm
shooting for is a "plugin" concept that wraps a defined configuration
to implement something useful in a particular module.  For an example,
see my configuration (http://osiris.kosmic.org/~jim/); I've
implemented a "wharf" using FvwmButtons, and a "taskbar" using
FvwmButtons, FvwmPager, and FvwmIconMan. The goal here is for each of
these "plugins" to be self-contained; adding one to a fvwm2
configuration should be as easy as putting "Read <filename>" in
.fvwm2rc.

Ultimately, the narrower "decor only" definition of a "theme" could be 
implemented in a similar "plugin" fashion.

---

From: Scott Scriven <[email-masked]>
Date: Mon, 08 Mar 1999 14:10:29 -0700

> method for fvwm themes.  This newer version has dynamic menus and

Woo-hoo!  I hope you don't mind if I bug you about it...  (again)  :)

> this same task.  I know that the preceding syntax is incorrect, as I

I'd try making a function for it...

DestroyFunc "Funky-Restart"
AddToFunc "Funky-Restart"
+ "I"   Exec $0
+ "I"   Restart fvwm2

> change.  I would like them to change whenever the menu is opened, if

Again, try a function to do this:

DestroyFunc "Refresh-and-Popup"
AddToFunc "Refresh-and-Popup"
+ "I"   Piperead $1 $2 $3 $4 $5 $6 $7 $8 $9
+ "I"   Popup $0

Mouse 1 R A Refresh-and-Popup UtilitiesMenu /usr/local/bin/UtilMenuPipe

The "UtilMenuPipe" program would output commands to destroy and then
recreate the "UtilitiesMenu".  It will need to update all dynamic items
accessible from that menu, though, since sub-menus can't have commands
attached to them like mouse clicks can.

> extraction.. also, it sports a better way of organization.

One "feature" I'd love to see is the ability to configure whether background
images are part of the "theme".  I personally dislike having the two
connected, but a lot of people disagree.  About the closest I get to
including a background with a theme is doing an optional "Exec bkgd green"
when switching to a green-ish theme.  (my backgrounds are sorted by color,
and a green one would be randomly chosen)

Also, it'd be neat to have some sort of consistency between actions in
different themes.  So, keyboard (and most mouse) input might be better off
in a "fvwm-input" file instead of being included with each theme.  (but
titlebar button-actions would have to be in the theme, of course)

For theme switching, the easiest method I've found to switch on the fly is
to have each theme in a separate file, and access them through a menu
similar to this in my "fvwm-theme":

DestroyFunc ReadStyle
AddToFunc ReadStyle
# Restore the defaults
+       "I"     Read fvwm-theme.default
# Change the theme...
+       "I"     Read $0
# Restore the user's override settings...
+       "I"     Read .fvwm2rc.style
+       "I"     Recapture

DestroyMenu "NewTheme"
AddToMenu "NewTheme"
+ "Choose A New Theme"          Title
+ "&Pseudo"                     ReadStyle fvwm-theme.pseudo
+ "&Hazard"                     ReadStyle fvwm-theme.hazard
+ "&Granite"                    ReadStyle fvwm-theme.granite
...blablabla...

To add new themes to the collection, just add a line to this menu.  I also
add them to my "RandomTheme" function, so I'll get a different one each time
I log in.  It's also handy to have a "Read .fvwm2rc.theme" at the bottom of
the file so users can add their own customized stuff.  I make sure to do
this in each config file, since I'm defining the default configuration for
all my users, and everyone has different tastes.

Backgrounds can easily be handled by another dynamic menu.  I keep
backgrounds in /usr/local/lib/X11/backgrounds/ and $HOME/backgrounds/, and a
"bkgd" script uses these.  It's reasonably easy to convert a filesystem tree
into a menu structure with piperead, so the user can select a specific
background or an entire directory to pick one randomly.

If you're interested, the bkgd script is available on my page (below), and I
can send you my current (unfinished) fvwm2 setup.  (the one on my page is a
bit outdated now)

:)

 _  _ _  _ ___ ___  -----------"Use the source, Luke!"---------
( \/ ( \/ (__ (__ ) | ~  Scott Scriven (Toy Keeper / XYZZ)    |
 \  / \  /  //  //  | mailto:[email-masked]           |
 /  \ / /  //_ //_  | mailto:[email-masked]         |
(_/\_(_/  (___(___) | http://www.vis.colostate.edu/~scriven/  |
--
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: Jim Nicholson <[email-masked]>
Date: Mon, 8 Mar 1999 20:31:23 -0500 (EST)

> John Anderson wrote:
 
...

 > and a green one would be randomly chosen)

Not to imply that anything good can come out of Redmond, the Win98
themes manager does allow selective opt-out of various aspects of each 
theme (sounds, mouse icons, fonts, colors, background, screen saver,
etc. That's what I was driving at with my blather about plugins; each
aspect of the theme should be loaded independently, so one could mix
and match.

Also, is FvwmBacker faster these days? Last time I played with it, it
was a dog...

 > titlebar button-actions would have to be in the theme, of course)

If a theme sets icons for apps, there especially needs to be an
opt-out; anyone using an Icon Manager will want that.