On 2015-12-12, Dan Espen wrote:

> Oleksandr Gavenko <gaven...@gmail.com> writes:
>>   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


  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##*/}.* ]; 
                echo fail
          done | wc -l

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

>> 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 ...)?
> 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/ 

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

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!

> 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

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?

>> 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.
> You've lost me.
> menudefs.hook looks to me like some kind of menu generator.

Debian have "Debian menu policy":


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

> 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

  $ fvwm-menu-desktop --version

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:




and uses little:


to generate menu from /etc/xdg/menus/*.menu entries.

Best regards!

Reply via email to