I discussed the process of manually generating an applications menu in Window Maker in a previous post. If you are running a Debian (or Debian-based) Window Maker installation, one thing you might miss is automatic menu updates whenever you add or remove applications.
I'm going to provide a method for (nearly) automatic menu generation an updating in Debian Window Maker systems in this post.
Step 1: Install the packages "menu" and "menu-xdg."
These two packages are available in all three divisions of the Debian repositories (i.e., stable, testing and experimental), so open a terminal and enter:
sudo aptitude install menu menu-xdg
Step 2: Make the file /etc/menu-methods/wmaker executable
In a terminal, enter:
sudo chmod +x /etc/menu-methods/wmaker
Step 3: Run the update script
In a terminal:
update-menus
If all went well, you should find your default Window Maker menu transformed into something like this:
Which will give you this sort of sub-menu:
Now, I mentioned that this method provides (nearly) automatic menu updates. The (nearly) part means that each time you add or remove software, you will need to remember to run the "update-menus" script. If you are so inclined, you could set this up to run at each session login, but that's up to you.
The downside to this approach, as I mentioned in a previous post, is that you lose the ability to customize the menu manually using the WPrefs.app menu functions. I'm a bit torn on this - on the one hand, being able to manually tweak the menu by adding all sorts of commands and also being able to organize the menu items exactly as I see fit is nice. On the other hand, the manual approach takes a good deal of work - especially on a fresh install of Window Maker, and having to remember to add every application I install each time I install something can be a pain.
I might also serve notice that I am not familiar with Window Maker's menu behavior outside the Debian world. I have run Window Maker on an Arch Linux installation, but I honestly don't remember the specifics for that distribution. If you are using anything but Debian, please look for information specific to your distribution.
So I've covered two menu production approaches for Debian-based Window Maker instances. If you know of other - possibly better - approaches, please don't hesitate to let me know!


There is a utility called wmgenmenu which generates a WMRootMenu in your stdout by searching which applications are installed. For example,
ReplyDeletewmgenmenu > $HOME/GNUstep/Defaults/WMRootMenu
will create a menu automatically.
There is also another program called wmmenugen which understands about 'xdg'.
There is a way you can have the best of both worlds; a menu you can manually update with WPrefs which includes a submenu of applications which automatically updates every time applications are installed or un-installed.
ReplyDeleteArch Linux includes a perl script xdg_menu which reads the xdg menu config files and generates a submenu formatted for Window Maker.
Documentation is here: http://goo.gl/J33p7
Script can be downloaded from here: http://goo.gl/YWWTv
To use, in the WPrefs menu configuration use the "Generated Submenu" item to add a new submenu. For the command use something like: "xdg_menu --format WindowMaker --fullmenu --root-menu /etc/xdg/menus/applications.menu"
You may need to change the applications.menu file if that particular file isn't on your system. On a Debian system debian-menu.menu will provide a very detailed menu.
NOTE: I have only been able to get the "Generated Submenu" to work on Window Maker version 0.95.4. It seems to crash the window manager on earlier versions. If you are on an earlier version and can't, or don't want to, upgrade you can use the xdg_menu script to create a menu file and reference that file using the "External Submenu" in WPrefs. You can then regularly update the file with a cron job or perhaps the autostart file if you regularly restart Window Maker.