Discussion:
FVWM: dynamic xdg menus
Victor Ananjevsky
2011-09-19 17:01:02 UTC
Permalink
Hi, List

Please look at program i wrote for creating dynamic xdg menus in fvwm.

http://pastebin.com/TmhLRFfp

This program creates menus with icons and localized names. Each submenu is a
dynamic menu creates with DynamicPopupAction.

System icons caches in $XDG_CONFIG_HOME/fvwm, so this path mus be added to
fvwm's ImagePath

Program runs as

fvwmmenu [-s SIZE] [-t TERM] MenuName [/Path/To/Submenu]

Parameter '-s' sets the size of cached icons. By default size of icons for
menu from gtk settings is used. '-t' sets the command for terminal emulator.
By default it is sets to "xterm". Terminal command must understand '-e' parameter
for launching applications.

MenuName is a case-insensitive menu name, for example "Applications" or
"Settings". Special menu name "Recent" create menu for recently opened files.

Optional argument /Path/To/Submenu specifies only one submenu to create.
For example, command 'fvwmmenu Applications /Development' create only
Development menu for Applications.

Program requires gtk+ and gnome-menus.

Hope it will be useful not only for me. Any comments or suggestions are
very appreciated.
--
Victor Ananjevsky <***@gmail.com>
d***@verizon.net
2011-09-19 17:39:51 UTC
Permalink
Post by Victor Ananjevsky
Hi, List
Please look at program i wrote for creating dynamic xdg menus in fvwm.
http://pastebin.com/TmhLRFfp
This program creates menus with icons and localized names. Each submenu is a
dynamic menu creates with DynamicPopupAction.
System icons caches in $XDG_CONFIG_HOME/fvwm, so this path mus be added to
fvwm's ImagePath
Program runs as
fvwmmenu [-s SIZE] [-t TERM] MenuName [/Path/To/Submenu]
Parameter '-s' sets the size of cached icons. By default size of icons for
menu from gtk settings is used. '-t' sets the command for terminal emulator.
By default it is sets to "xterm". Terminal command must understand '-e' parameter
for launching applications.
MenuName is a case-insensitive menu name, for example "Applications" or
"Settings". Special menu name "Recent" create menu for recently opened files.
Optional argument /Path/To/Submenu specifies only one submenu to create.
For example, command 'fvwmmenu Applications /Development' create only
Development menu for Applications.
Program requires gtk+ and gnome-menus.
Hope it will be useful not only for me. Any comments or suggestions are
very appreciated.
Won't compile here:

home> pkg-config --cflags --libs gtk+-2.0 libgnome-menu
Package libgnome-menu was not found in the pkg-config search path.
Perhaps you should add the directory containing `libgnome-menu.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libgnome-menu' found

Running FC15.

Not sure what your version does, I haven't looks closely.
Any reason you decided not to use or enhance fvwm-menu-desktop?
--
Dan Espen
Thomas Adam
2011-09-20 21:48:05 UTC
Permalink
Post by Victor Ananjevsky
Hi, List
Please look at program i wrote for creating dynamic xdg menus in fvwm.
http://pastebin.com/TmhLRFfp
Nice idea, but I'd rather you'd look at fvwm-menu-desktop, as Dan has
mentioned. Assuming of course there is anything lacking with it. This sort
of thing *should* be done using perl, as far as FVWM is concerned, rather
than C.

I wouldn't object to a clean-up of fvwm-menu-desktop though. It will need
doing at some point. :)

I thought at first this was going to hold up the 2.6.3 release of FVWM, but
I see now it won't.

-- Thomas Adam
--
"It was the cruelest game I've ever played and it's played inside my head."
-- "Hush The Warmth", Gorky's Zygotic Mynci.
Loading...