John Anderson wrote:
> 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
Woo-hoo! I hope you don't mind if I bug you about it... (again) :)
> 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
I'd try making a function for it...
DestroyFunc "Funky-Restart"
AddToFunc "Funky-Restart"
+ "I" Exec $0
+ "I" Restart fvwm2
> 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.
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.
> 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.
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:toykeeper_at_cheerful.com |
/ \ / / //_ //_ | mailto:scriven_at_CS.ColoState.edu |
(_/\_(_/ (___(___) |
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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Mon Mar 08 1999 - 15:06:21 GMT