Re: FVWM: Is there a module HOWTO?

From: S. Anderson <sndavis_at_crosswinds.net>
Date: Sat, 20 Jan 2001 01:16:12 -0700

On Fri, Jan 19, 2001 at 11:45:36PM -0600, Glen Lee Edwards wrote:
> Is there a HOW-TO somewhere that explains the basics of writing your own module
> for FVWM?
>
> For example, I have a directory of backgrounds that I like to add in new
> graphics for the root window (and eventually do the same for icons). I
> currently have a subpanel that lists most of these graphics, but I have to hand
> enter them into .fvwm2rc. I'm looking for a tutorial that would explain the
> basics of what information I would have to pipe into fvwm when the module loads
> that would allow a perl program I'd write to read all the files in the
> backgrounds directory, format the information, and then send it to fvwm.
>
> Thanks,
>
> Glen
>

Hello,
    The man page tells how make a function to read a directory of jpg's
and place them in a menu (search for JpgMenu), I modified it a bit so
that when I start fvwm2 i get the same picture i last set, hopefully
this helps you...

# Build a menu of pictures.
AddToMenu PixMenu
+ DynamicPopupAction Function MakePixMenu

AddToFunc MakePixMenu
+ I DestroyMenu recreate PixMenu
+ I AddToMenu PixMenu Pictures Title
+ I PipeRead 'for i in ~/pix/*.*;do echo AddToMenu PixMenu "`basename $i`" \
        Exec "Esetroot -s $i && echo $i > $HOME/.fvwm/desktop_picture"; done'

AddToFunc InitFunction
+ I Exec Esetroot -s `cat $HOME/.fvwm/desktop_picture`


sa

PS there is information about modules here: http://www.fvwm.org/modules.html
--
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 Sat Jan 20 2001 - 02:17:46 GMT

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