On 20 Aug 2003 14:32:17 +0200, Jules Alberts wrote:
>
> Op 20 Aug 2003 (13:41), schreef Dominik Vogt <fvwm_at_fvwm.org>:
> > On Wed, Aug 20, 2003 at 01:22:59PM +0200, Jules Alberts wrote:
> > > Can anybody tell me if there are fvwm-menu-directory online somewhere?
> > > I love this feature but even with the manpage I have some questions...
> > > Mainly about --icon-file and to have a directory menu as top level
> > > menu. TIA!
> >
> > Have you tried
> >
> > $ man fvwm-menu-directory
> >
> > ?
>
> Sure, maybe it's better if I mention concretely what I want. I have a
> menu that works like this:
>
> My first question is how to add directory entries at toplevel of the
> menu. With this setup:
>
> Key Super_L A A Popup menu_root Root 8 1
>
> AddToFunc FuncFvwmMenuDirectory$
> + I PipeRead "fvwm-menu-directory \\$
> --title '' \\$
> --icon-dir /home/blah/data/fvwm/resource/folder-menu.xpm \\$
> --exec-app '^exec' \\$
> -d '$0'"
>
> AddToMenu menu_root MissingSubmenuFunction FuncFvwmMenuDirectory$
> + "menu" Popup /home/blah/data/fvwm/testmenu
>
> I get a submenu in my menu with the contents of the testmenu directory.
> But I want the contents of the testmenu directory to be in the menu,
> not in a submenu.
The way fvwm-menu-directory works is: one invocation builds one menu for
one directory. By default this menu is destroyed when you pop down the
menu. This way you always get the up-to-date listing in the menu and not
the one that is several months old (assuming you run fvwm for this long).
> Another question: how can I prevent my submenus from having a title?
> The best I came up with is --title '' which is kind of ugly.
The title is always added. Are you sure you really don't want any title,
how would you distinguish between different listings then? You may use
some desciptive title: --title "My important files".
If you really don't like the title, do this:
AddToFunc FuncFvwmMenuDirectory
+ I PipeRead `fvwm-menu-directory -d '$0' | grep -v '$0" ' | grep -v Nop`
> The last question is about icons. This is from the manpage:
>
> --icon-title icon menu title icon, default is no
> --icon-dir icon menu dir icon, default is no
> --icon-file icon menu file icon, default is no
> --icon-app icon menu application icon, default is no
> --wm-icons define icon names suitable for use with wm-icons package.
> Currently this is equivalent to: --icon-title menu/folder-open.xpm
> --icon-item menu/file.xpm --icon-dir menu/folder.xpm --icon-app
> menu/utility.xpm.
>
> --wm-icons looks nice but I'm not sure what it does... The way I
> interpret is, I should be able to do this: there is a shortcut to gvim
> in my menu-dir. Now, if I put a file gvim.xpm in the menu-dir, it
> should appear as an icon before the gvim entry. Alas, it doesn't, the
> xpm appears as a file. How do the icons work?
Nope, --wm-icons was not designed to work like this, you are not supposed
to put any icons anywhere, it just assumes that you have wm-icons package
installed. With this options the installed icons will be automatically
used and the actual icon theme seen in menus is configurable by wm-icons.
You just need "ImagePath $HOME/.wm-icons:/usr/local/share/icons/wm-icons:+",
like explained in the wm-icons.sf.net documentation.
Apart of the usage of the word "no" instead of "nope", I think the man
page explains that you may assign 4 icons for different file types. Your
approach to handle some files differently by using them as icons of the
previous file seems very strange to me. Especially when we speak about
random directories (like /tmp or $HOME/.fvwm) and the file order is
configurable. I am not against such features, but this one is not well
defined. Please also keep in mind that this script does not currently
manages icons itself, it is fvwm that searches the icons in ImagePath.
If I understand correctly, you want to prepare the application hierarhies
to be used in menus. This is what another script fvwm-menu-desktop was
designed for, so try it. You should prepare .desktop files similarly to
GNOME and KDE that define the icon and the name for every application.
fvwm-menu-directory is more for arbitrary (non prepared) directories.
Regards,
Mikhael.
--
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 20 2003 - 11:40:44 BST