FVWM: Gnome icons in root menu.

From: Atul Awasthi <atulawasthi_at_gmail.com>
Date: Wed, 4 Aug 2004 12:54:52 +0530

I can succesfully use gnome icons with semi-auto updates on root menu.
Here is how it works.

###################################################################
SetEnv fvwm_icons $[HOME]/.icons/Marcintesh_OS-W/
#
#
#
+ "System"%$[fvwm_icons]192x192/apps/gnome-system.png%
Popup MenuSystem
+ "Office"%$[fvwm_icons]192x192/apps/gnome-applications.png%
     Popup MenuOffice
###################################################################

And so on... Now next time when I need to change the icons. I just
need to change the fvwm_icons path. But as you might have guessed,
there is one big problem with it. The icons are too huge.. Is there a
way to resize them before using? I know there is since there is a
wallpaper browser that does the same thing for every PNGs in a
wallpaper directory.
Here is the code for that..

###################################################################
#### Browse Wallpapers Directory
DestroyFunc WallpaperBrowser
AddToFunc WallpaperBrowser
+ I PipeRead 'test ! -d "$0/.thumbs" && mkdir "$0/.thumbs"; \
    for i in "$0/"*; do \
        test -f "$0/.thumbs/${i##*/}" \
            -a "${i}" -ot "$0/.thumbs/${i##*/}" || { \
                convert -quality 0 -scale 24 "${i}"
"png:$0/.thumbs/${i##*/}" 2>/dev/null \
                    || continue; \
            }; \
    done; \
    fvwm-menu-directory --icon-title icons/blue/browse.png --icon-file
__PIXMAP__ \
    --icon-dir icons/blue/browse.png --dir $0 --exec-file "^Esetroot -s" \
    --exec-t="^eog *" | sed -e "s#FuncFvwmMenuDirectory#WallpaperBrowser#g" \
    -e "s#__PIXMAP__\\(.*\\)\\"\\(.*/\\)\\(.*\\)\\"#\\2.thumbs/\\3\\1\\2\\3#g"'
###################################################################

There is one more thing that needs to be taken care of.. Setting a
fallback icons that can be used when the icons doesnt exist in
fvwm_icons. Complete icon set is pretty rare in gnome stock icons, so
the menu should be able to use pre specified icons when the default
ones (fvwm_icons) are missing.

As you can guess, I am trying to get a semi-automated icon updates for
menu, but since I have no skills in bash scripting, I will be forever
thankful to you while updating the icons, If someone can be kind
enough to do the hard job :)

Thanks.
--
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 Wed Aug 04 2004 - 02:27:58 BST

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