Discussion:
FVWM: Is it possible to resize automatically icons in AddToMenu?
Oleksandr Gavenko
2015-12-11 19:55:52 UTC
Permalink
Look to syntax %...% in:

DestroyMenu MenuMyDev
AddToMenu MenuMyDev "My Dev Menu" Title
+ &Firefox%iceweasel.png% Exec exec firefox -no-remote -P devel

ImagePath control colon search path for icons and I have broad definition to
gather different sources (as many as possible):

m4_define(`m4_IMGPATH', `$[FVWM_USERDIR]/images')m4_dnl
m4_define(`m4_ICONPATH', `$[FVWM_USERDIR]/icons')m4_dnl

ImagePath m4_ICONPATH:m4_IMGPATH:+

ImagePath +:/usr/share/icons/gnome/16x16/places
ImagePath +:/usr/share/icons/gnome/32x32/apps
ImagePath +:/usr/share/icons/gnome-colors-common/32x32/apps
ImagePath +:/usr/share/icons/locolor/32x32/apps
# ImagePath +:/usr/share/icons/hicolor/16x16/apps
ImagePath +:/usr/share/icons/hicolor/22x22/apps
ImagePath +:/usr/share/icons/hicolor/24x24/apps
ImagePath +:/usr/share/icons/hicolor/32x32/apps
ImagePath +:/usr/share/icons/hicolor/48x48/apps
# ImagePath +:/usr/share/icons/hicolor/64x64/apps
# This paths contain large icons for some apps, they make menus look ugly...
# ImagePath +:/usr/share/app-install/icons/
# ImagePath +:/usr/share/pixmaps

Some paths commented because they provide too big images. Fvwm uses exact
size of image when it displays icon. Some of them occupy half of screen!

Are there any syntax:

(1) to set maximum allowed icon size for displaying (and ignore large image)?
(2) to specify how resize image (scale down any that bigger then ...)?

I can't control which icon is supplied by package in Debian repository. That
is true for:

/usr/share/app-install/icons/
/usr/share/pixmaps/

Most package doesn't respect /usr/share/icons/hicolor/24x24/apps like
directories and place icons in above paths.

Auto-generated /etc/X11/fvwm/menudefs.hook uses full path to icon so I can't
select desired size by ImagePath.

Some 3rd-party packages I install in /opt hierarchy and usually they also have
single BIG icon.

I like to see (2) option e.g. something like:

+ &Firefox%iceweasel.png%32% Exec exec firefox -no-remote -P devel

but (1) option also take a lot of images from /usr/share/pixmaps like
directories.

Another option is to preprocess /etc/X11/fvwm/menudefs.hook and place resized
images into predefined path.

Or carefully craft processing of /etc/xdg/menus/*.menu. I use xdg.Menu and
xdg.DesktopEntry Python classes to build menus myself.

If Fvwm hold menu images into memory (without loading on demand) - present of
(2) option looks natural for me.
--
Best regards!
Dan Espen
2015-12-11 23:32:57 UTC
Permalink
Post by Oleksandr Gavenko
DestroyMenu MenuMyDev
AddToMenu MenuMyDev "My Dev Menu" Title
+ &Firefox%iceweasel.png% Exec exec firefox -no-remote -P devel
ImagePath control colon search path for icons and I have broad definition to
m4_define(`m4_IMGPATH', `$[FVWM_USERDIR]/images')m4_dnl
m4_define(`m4_ICONPATH', `$[FVWM_USERDIR]/icons')m4_dnl
ImagePath m4_ICONPATH:m4_IMGPATH:+
ImagePath +:/usr/share/icons/gnome/16x16/places
ImagePath +:/usr/share/icons/gnome/32x32/apps
ImagePath +:/usr/share/icons/gnome-colors-common/32x32/apps
ImagePath +:/usr/share/icons/locolor/32x32/apps
# ImagePath +:/usr/share/icons/hicolor/16x16/apps
ImagePath +:/usr/share/icons/hicolor/22x22/apps
ImagePath +:/usr/share/icons/hicolor/24x24/apps
ImagePath +:/usr/share/icons/hicolor/32x32/apps
ImagePath +:/usr/share/icons/hicolor/48x48/apps
# ImagePath +:/usr/share/icons/hicolor/64x64/apps
# This paths contain large icons for some apps, they make menus look ugly...
# ImagePath +:/usr/share/app-install/icons/
# ImagePath +:/usr/share/pixmaps
I don't see the logic of adding all the different icon sizes to your
image path. They all have the same names, so only the first size you
mention is going to be found.
Post by Oleksandr Gavenko
Some paths commented because they provide too big images. Fvwm uses exact
size of image when it displays icon. Some of them occupy half of screen!
(1) to set maximum allowed icon size for displaying (and ignore large image)?
(2) to specify how resize image (scale down any that bigger then ...)?
No. You wouldn't want your icon resized each time it's displayed.
Better to pick the size you want at startup time like
fvwm-menu-desktop does.
Post by Oleksandr Gavenko
I can't control which icon is supplied by package in Debian repository. That
/usr/share/app-install/icons/
/usr/share/pixmaps/
Most package doesn't respect /usr/share/icons/hicolor/24x24/apps like
directories and place icons in above paths.
Auto-generated /etc/X11/fvwm/menudefs.hook uses full path to icon so I can't
select desired size by ImagePath.
Some 3rd-party packages I install in /opt hierarchy and usually they also have
single BIG icon.
+ &Firefox%iceweasel.png%32% Exec exec firefox -no-remote -P devel
but (1) option also take a lot of images from /usr/share/pixmaps like
directories.
Another option is to preprocess /etc/X11/fvwm/menudefs.hook and place resized
images into predefined path.
Or carefully craft processing of /etc/xdg/menus/*.menu. I use xdg.Menu and
xdg.DesktopEntry Python classes to build menus myself.
If Fvwm hold menu images into memory (without loading on demand) - present of
(2) option looks natural for me.
You've lost me.
menudefs.hook looks to me like some kind of menu generator.
You should try fvwm-menu-desktop if you haven't done so already.
Use the size= parameter to control the icon sizes.
--
Dan Espen
Oleksandr Gavenko
2015-12-16 19:25:45 UTC
Permalink
Post by Dan Espen
Post by Oleksandr Gavenko
ImagePath +:/usr/share/icons/gnome/16x16/places
ImagePath +:/usr/share/icons/gnome/32x32/apps
ImagePath +:/usr/share/icons/gnome-colors-common/32x32/apps
ImagePath +:/usr/share/icons/locolor/32x32/apps
# ImagePath +:/usr/share/icons/hicolor/16x16/apps
ImagePath +:/usr/share/icons/hicolor/22x22/apps
ImagePath +:/usr/share/icons/hicolor/24x24/apps
ImagePath +:/usr/share/icons/hicolor/32x32/apps
ImagePath +:/usr/share/icons/hicolor/48x48/apps
# ImagePath +:/usr/share/icons/hicolor/64x64/apps
# This paths contain large icons for some apps, they make menus look ugly...
# ImagePath +:/usr/share/app-install/icons/
# ImagePath +:/usr/share/pixmaps
I don't see the logic of adding all the different icon sizes to your
image path. They all have the same names, so only the first size you
mention is going to be found.
In ideal world each icon have flavor in 16x16, 22x22, 24x24, etc. But some
miss:

#!/bin/bash

list=(22x22 24x24 32x32 48x48)

for ((i=0; i<${#list[*]}; i++)) do
for ((j=$((i+1)); j<${#list[*]}; j++)) do
printf "%s %s " ${list[$i]} ${list[j]};
for f in /usr/share/icons/hicolor/${list[i]}/apps/*; do
f=${f##*/}; f=${f%.*}
if [ ! -f /usr/share/icons/hicolor/${list[j]}/apps/${f##*/}.* ]; then
echo fail
fi
done | wc -l
done
done

Result on my host:

Prese Absent Num

22x22 24x24 4
22x22 32x32 3
22x22 48x48 3
24x24 32x32 8
24x24 48x48 4
32x32 48x48 13
Post by Dan Espen
Post by Oleksandr Gavenko
Some paths commented because they provide too big images. Fvwm uses exact
size of image when it displays icon. Some of them occupy half of screen!
(1) to set maximum allowed icon size for displaying (and ignore large image)?
(2) to specify how resize image (scale down any that bigger then ...)?
No. You wouldn't want your icon resized each time it's displayed.
That is not true in my environment (Debian with stock Fvwm v2.6.5).

I issue:

$ inotifywait -m -r /usr/share/icons/ /usr/share/app-install/icons/ /usr/share/pixmaps

and during walking across menu entries there are no access to above
directories.

Also my ~/.xsession-errors full of:

[fvwm][scanForPixmap]: <<WARNING>> Couldn't load image from lmms.xpm
[fvwm][scanForPixmap]: <<WARNING>> Couldn't load image from muse_icon.xpm
[fvwm][scanForPixmap]: <<WARNING>> Couldn't load image from mscore.xpm

during `xinit' evaluation.

So Fvwm hold menu icons in memory!
Post by Dan Espen
Better to pick the size you want at startup time like
fvwm-menu-desktop does.
I read about this script on this list but fail use it.

After debugging I found why, this:

sub get_root_menu
{
my $xdg_config_dirs = $ENV{XDG_CONFIG_DIRS} || '';
my $xdg_menu_prefix = $ENV{XDG_MENU_PREFIX} || '';

foreach my $dir (split(/:/, $xdg_config_dirs), "/etc/xdg")
{
my $menu_file="$dir/menus/${xdg_menu_prefix}applications.menu"; #
warn "looking for root menu $menu_file\n" if $verbose;
return "$menu_file" if -f "$menu_file";
}
return "";
}

uses $XDG_MENU_PREFIX. After reading man page I assume that I should pass
desktop name:

$ ls /etc/xdg/menus/*.menu
/etc/xdg/menus/debian-menu.menu
/etc/xdg/menus/gnome-applications.menu
/etc/xdg/menus/lxde-applications.menu
/etc/xdg/menus/xfce-applications.menu

as --desktop option. But actually it work only with calling like:

$ XDG_MENU_PREFIX=debian- fvwm-menu-desktop
$ XDG_MENU_PREFIX=gnome- fvwm-menu-desktop
$ XDG_MENU_PREFIX=xfce- fvwm-menu-desktop

It look strange and XDG_MENU_PREFIX isn't mentioned in man page ((

Man page doesn't point to https://developer.gnome.org/menu-spec/ either.

Does mainstream supply man page or that do Debian?
Post by Dan Espen
Post by Oleksandr Gavenko
I can't control which icon is supplied by package in Debian repository. That
/usr/share/app-install/icons/
/usr/share/pixmaps/
Most package doesn't respect /usr/share/icons/hicolor/24x24/apps like
directories and place icons in above paths.
Auto-generated /etc/X11/fvwm/menudefs.hook uses full path to icon so I can't
select desired size by ImagePath.
Some 3rd-party packages I install in /opt hierarchy and usually they also have
single BIG icon.
+ &Firefox%iceweasel.png%32% Exec exec firefox -no-remote -P devel
but (1) option also take a lot of images from /usr/share/pixmaps like
directories.
Another option is to preprocess /etc/X11/fvwm/menudefs.hook and place resized
images into predefined path.
Or carefully craft processing of /etc/xdg/menus/*.menu. I use xdg.Menu and
xdg.DesktopEntry Python classes to build menus myself.
If Fvwm hold menu images into memory (without loading on demand) - present of
(2) option looks natural for me.
You've lost me.
menudefs.hook looks to me like some kind of menu generator.
Debian have "Debian menu policy":

https://www.debian.org/doc/packaging-manuals/menu.html/

This is ancient format (dated 1997) to unify menu format for Debian packages. I
filed several bugs to include menu entry for some packages.

Today nobody care about about that menu system. And about 32x32 icons - just
put `.svg' file with `.desktop' file.

Only bizarre WM adapted to use Debian menu system:

$ apt-file search /etc/menu-methods

aewm: /etc/menu-methods/aewm
awesome: /etc/menu-methods/awesome
blackbox: /etc/menu-methods/blackbox
choosewm: /etc/menu-methods/choosewm
ctwm: /etc/menu-methods/ctwm
deskmenu: /etc/menu-methods/deskmenu
fluxbox: /etc/menu-methods/fluxbox
flwm: /etc/menu-methods/flwm
fvwm: /etc/menu-methods/fvwm
fvwm-crystal: /etc/menu-methods/fvwm-crystal
fvwm1: /etc/menu-methods/fvwm1
icewm-common: /etc/menu-methods/icewm-common
jwm: /etc/menu-methods/jwm
mwm: /etc/menu-methods/mwm
notion: /etc/menu-methods/notion
notion: /etc/menu-methods/notion-i18n
olvwm: /etc/menu-methods/olvwm
olwm: /etc/menu-methods/olwm
openbox: /etc/menu-methods/openbox
pekwm: /etc/menu-methods/pekwm
ratmenu: /etc/menu-methods/ratmenu
ratpoison: /etc/menu-methods/ratpoison
rxvt: /etc/menu-methods/rxvt
sapphire: /etc/menu-methods/sapphire
sawfish: /etc/menu-methods/sawfish
tritium: /etc/menu-methods/tritium
twm: /etc/menu-methods/twm
vtwm: /etc/menu-methods/vtwm
windowlab: /etc/menu-methods/windowlab
wm-icons: /etc/menu-methods/wm-icons
wmaker: /etc/menu-methods/wmaker
wmaker-common: /etc/menu-methods/wmappearance
wmanager: /etc/menu-methods/wmanager

`/etc/X11/fvwm/menudefs.hook' is actually result of `/etc/menu-methods/fvwm'
and I source that by:

Read /etc/X11/fvwm/menudefs.hook quiet
Post by Dan Espen
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?

How is script supposed to manage icon size? It resize them and store under
~/.cache/fvwm dir?

================================================================

I install my:

http://hg.defun.work/skel/file/tip/.fvwm/config

by:

http://hg.defun.work/skel/file/tip/Makefile

and uses little:

http://hg.defun.work/skel/file/tip/.fvwm/xdg2fvwm.py

to generate menu from /etc/xdg/menus/*.menu entries.
--
Best regards!
Thomas Funk
2015-12-17 23:23:29 UTC
Permalink
[snip]
Post by Oleksandr Gavenko
Post by Dan Espen
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/

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

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.

[snip]
Post by Oleksandr Gavenko
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/

-- Thomas --
--
--
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe." -- Albert Einstein
Dan Espen
2015-12-18 02:38:50 UTC
Permalink
Post by Thomas Funk
[snip]
Post by Oleksandr Gavenko
Post by Dan Espen
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.
- 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/
Not sure a manual install is a good idea.

To download the latest version from CVS:

cvs -d :pserver:***@cvs.fvwm.org:/home/cvs/fvwm checkout -r branch-2_6 fvwm

To build it:

utils/configure_dev.sh
/configure
make
make install (as root)

You'll probably find you need a few -devel packages.
Post by Thomas Funk
Or you could download it from here (if you won't follow the CVS
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
Hmm, heard of it but know nothing about the Nightshade project.
I see on their page:

Works with FVWM 2.6.5 without loosing new Xdg menu support from FVWM
CVS version.

Not sure that's a good thing.
I guess it's time I did a new stable release.
I retire this spring, maybe I'll find time then.
Post by Thomas Funk
# 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.
[snip]
Post by Oleksandr Gavenko
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/
-- Thomas --
Thanks.
--
Dan Espen
Oleksandr Gavenko
2015-12-18 12:32:43 UTC
Permalink
Post by Dan Espen
Not sure a manual install is a good idea.
utils/configure_dev.sh
/configure
make
make install (as root)
I do that with consulting to:

http://www.fvwm.org/documentation/dev_cvs.php?theme=navigate

but instead:

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

and extract $PWD/.usr/bin/fvwm-menu-desktop for my needs.

I filed a bug:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=808292
Replace fvwm-menu-desktop with upstream version (they rewrite from Perl to Python XDG library).

so hope some times I didn't do any manual actions to get fvwm-menu-desktop.
Post by Dan Espen
You'll probably find you need a few -devel packages.
During ./configure I get:

With GTK+ required for FvwmGtk? no: Failed to detect GTK, see config.log

That is not required by my willing but I think I have all build prerequisites.

I think that corresponding config.log lines are:

configure:13205: $? = 0
configure:13205: ./conftest
configure:13205: $? = 0
configure:13220: result: yes
configure:13245: checking for unsetenv
configure:13245: gcc -o conftest -Wall -Wno-implicit-int -g -O2 -I/usr/include/freetype2 conftest.c -lfontconfig -lfreetype >&5
configure:13245: $? = 0
configure:13245: result: yes
configure:13307: checking for gtk-config
configure:13338: result: no
configure:13347: checking for GTK - version >= 1.1.0
configure:13469: result: no
configure:13587: checking for imlib-config
configure:13618: result: no
configure:13627: checking for GDK IMLIB - version >= 1.8.0
configure:13711: result: no

If you have no time don't investigate this issue, I just wonder.
--
Best regards!
Oleksandr Gavenko
2015-12-18 12:16:52 UTC
Permalink
Post by Thomas Funk
[snip]
Post by Oleksandr Gavenko
Post by Dan Espen
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.
- 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!
Post by Thomas Funk
Or you could download it from here (if you won't follow the CVS
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.
Post by Thomas Funk
# 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
name:

~/.local/bin/fvwm-menu-desktop2

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!
Post by Thomas Funk
[snip]
Post by Oleksandr Gavenko
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!
Michelle Konzack
2015-12-20 13:45:56 UTC
Permalink
What about making your own menu definition file?

Take the original /etc/menu/fvwm file, copy it to a
new name like /etc/menu/fvwm-selfmade and modify it?

This is what I have done for my Debian packages like

tdfvwm-menu
tdfvwm-sidebars
tdfvwm-icons
...

Since I have a dispute with my ISP about my DOS attacked servers, my
sites are currently offline.

I will try to get another ISP next year (I am currently jobless and have
no money to setup a new server which cost 40€/month) and the you will
find again

http://www.debian.tamay-dogan.net/

and especialy

http://devel.debian.tamay-dogan.net/

where you will find all of my developments and debian packages.

Greetings
Michelle
--
Michelle Konzack ITSystems
GNU/Linux Developer 0033-6-61925193
Loading...