Stuart Longland <redhat...@gentoo.org> writes: > Hi all, > > I've been a long time user of Linux, and since about 1996, I've moved > between many window managers and desktop environments. > > I started out with FVWM, on Red Hat 4.0, and since then have moved > between environments such as FVWM95 (mainly on Slackware), MWM, OLVWM, > WindowMaker, KDE, Gnome (1 & 2), XFCE (3 & 4), LXDE, CTWM, and numerous > others. I still quite often find myself oscillating between KDE and > FVWM; often the former on more high-end systems, and the latter where I > want something minimal. > > Recently I've got fed up of KDE's antics, and have started setting up > FVWM2 proper. I wanted a convenient way of updating the menus from the > KDE menus. Luckily, there's fvwm-menu-desktop. However, I struck a > couple of snags. > > One, is that the documentation seems out of date. It tells us to use > the --desktop option, which is now "obsolete". Easily fixed once I > realised what was wrong, but still worth noting. > > Second, it initially couldn't find the root menu. It was looking for > /etc/xdg/menus/applications.menu, but couldn't find it. I did notice a > "kde-4-applications.menu" however, so I symlinked it, and that worked. > > Third thing I noticed, is that there were no keybindings (&-prefixed > characters) generated, and if a menu happened to contain a & symbol, > that symbol was falsely interpreted as a key-binding. So I concocted > the attached patch. > > This is a patch against the 2.6.3 release of FVWM's fvwm-menu-desktop. > It first prefixes & characters with a second & so they don't get > gobbled up. Next, it looks for the first letter or digit that isn't > already allocated to another menu item, and prefixes that with an &. > > The end result is a menu that looks like this: >> DestroyMenu "FvwmMenu-Utilities" >> AddToMenu "FvwmMenu-Utilities" "Utilities" Title >> + "&Akonaditray" Exec akonaditray >> + "A&rk" Exec ark -caption "Ark" >> + "&Disk Utility" Exec palimpsest >> + "&Filelight" Exec filelight >> + "&HP Device Manager" Exec hp-toolbox >> + "&KAlarm" Exec kalarm -caption "KAlarm" >> + "K&Calc" Exec kcalc -caption "KCalc" >> + "KChar&Select" Exec kcharselect -caption "KCharSelect" >> + "KD&E Groupware Wizard" Exec groupwarewizard >> + "K&Gpg" Exec kgpg >> + "K&Jots" Exec kjots -caption "KJots" >> + "K&Notes" Exec knotes >> + "K&TeaTime" Exec kteatime > > A better solution might be to see if there is some sort of keybinding > mnemonic field in the .menu file; I didn't look into this, but this > works well enough for my needs, and so I submit it here in the hope it > may be helpful to someone else.
Recently I started working on a new version of fvwm-menu-desktop. Using the new version I'm able to edit menu descriptions using Alacarte to include "&" where desired and have shortcuts appear in the menus. Plus it gets the mini-icons right. I'll redo the documentation when I'm ready to commit the changes. If you like, I'll send you a copy. -- Dan Espen