On 2015-12-18, Thomas Funk wrote:

> Oleksandr Gavenko wrote:
>> On 2015-12-12, Dan Espen wrote:
> [snip]
>>> You should try fvwm-menu-desktop if you haven't done so already.
>>> Use the size= parameter to control the icon sizes.
>>   $ fvwm-menu-desktop | grep size || echo fail
>>   fail
>>   $ fvwm-menu-desktop --version
>>   2.6.5
>> Too old or Debian maintainer broke script?
> [snip]
> Dan refers in his statement to the new fvwm-menu-desktop located in the
> CVS version of FVWM.
> If you want to use it, you need from CVS:
> - fvwm-menu-desktop (new Python based xdg menu generator)
> => copy it to /usr/bin/
> - fvwm-menu-desktop-config.fpl (configuration GUI)
> => copy it to /usr/share/fvwm/
> - fvwm-menu-desktop.1 (new man page)
> => copy it to /usr/share/man/man1/
Ok, I send bug report to Debian package maintainer to update package with
newer version!

> Or you could download it from here (if you won't follow the CVS 
> instructions from the FVWM web page):
> https://github.com/Fvwm-Nightshade/Fvwm-Nightshade/blob/release-0.6/bin/fvwm-menu-desktop2
> https://github.com/Fvwm-Nightshade/Fvwm-Nightshade/blob/release-0.6/fvwm/fvwm-menu-desktop2-config.fpl
> https://github.com/Fvwm-Nightshade/Fvwm-Nightshade/blob/release-0.6/man/fvwm-menu-desktop2.1.gz
I check sources as suggested by Dan Espen in followup.

> Add this to your config:
> # Dynamic menu realized with DynamicPopupAction
> AddToMenu MenuRoot DynamicPopupAction FuncMenuRoot
> DestroyFunc FuncMenuRoot
> AddToFunc   FuncMenuRoot
> + I DestroyMenu MenuRoot
> + I AddToMenu MenuRoot DynamicPopupAction MenuRoot
> + I AddToMenu MenuRoot "$[gt.Root Menu]" Title
> + I Popup FvwmMenu
> + I AddToMenu MenuRoot "" Nop
> # Remark: FuncMenuRoot exchanges your current root menu. Add your other
> # entries after the Nop line.
> #-----------------------------------------------------------------------
> # Dynamic FvwmMenu sub menu for XDG menus
> # realized with DynamicPopupAction
> #-----------------------------------------------------------------------
> AddToMenu FvwmMenu DynamicPopupAction FuncXdgMenusInRoot
> DestroyFunc FuncXdgMenusInRoot
> AddToFunc   FuncXdgMenusInRoot
> + I AddToMenu FvwmMenu DynamicPopupAction FuncXdgMenusInRoot
> + I Test (f $[FVWM_USERDIR]/.menu) Read $[FVWM_USERDIR]/.menu
> + I PipeRead 'fvwm-menu-desktop --insert-in-menu MenuRoot > 
> $[FVWM_USERDIR]/.menu &&  echo "Read $[FVWM_USERDIR]/.menu"'
> # Remark: if you're using the scripts from Fvwm-Nightshade don't forget
> # the '2' behind fvwm-menu-desktop ;-)
> For more information see the new fvwm-menu-desktop man page.
I don't understand some parts of your code (dynamic menu reconstruction, have
no time to deep into manual).

But it was enough to craft quick test without destroying running desktop.

So after building fvwm from CVS:

  ./configure --prefix=$PWD/.usr

In order to keep existent script live I put `fvwm-menu-desktop' under different


I try:

  $ fvwm-menu-desktop2 --insert-in-menu TestMenuRoot

But now man page state that I need XDG_MENU_PREFIX:

  $ XDG_MENU_PREFIX=gnome- fvwm-menu-desktop2 --insert-in-menu TestMenuRoot

Within FvwmConsole I run:

  DestroyMenu TestMenuRoot
  AddToMenu TestMenuRoot Menu Title
  PipeRead 'XDG_MENU_PREFIX=gnome- fvwm-menu-desktop2 --enable-mini-icon 
--insert-in-menu TestMenuRoot'
  Key F2 A M Menu TestMenuRoot Root c c

and on Alt+F2 I get SUPER FANCY menu.

Only one issue there is. With `--enable-mini-icon' option stript execution
time becomes near 20 sec. Subsequent call takes near 4 sec. While without
icons it works about 1 sec.

So I decide to build menus during `.fvwm' installation instead of using
dynamic build.

During experimentation I run `fvwm-menu-desktop-config.fpl' because it was
suggested by fvwm-menu-desktop when I didn't set XDG_MENU_PREFIX.

FvwmPerl man page say that this by may be placed into $FVWM_USERDIR. But I
decide live without it.

Thanks for support!

> [snip]
>> How is script supposed to manage icon size? It resize them and store under
>> ~/.cache/fvwm dir?
> [snip]
> You can set the wanted icon size via configuration GUI or command line.
> Default location for resized icons is ~/.fvwm/icons/
That is great! I was at writing my own solution.

Best regards!

Reply via email to