Add tool to automatically generate applications submenu for Apple menu
Currently, the Apple menu items need to be manually added per-theme. This can be tedious, especially after installing new applications and finding/making appropriate 16x16 XPM icons for applications that don't already have "styles" implemented in mlvwmrc. It'd helpful to have a tool that can automatically generate an application menu file to be included in the Apple menu.
There are some scripts out there that can automatically generate application menus for mlvwm, including:
- menubuilder.lua (lua)
- mlvwm-menu-script (shell)
Also, MenuMaker (python) could be updated to add mlvwm support.
I still haven't actually looked into the scripts I linked to in this issue's description, but I have since written my own ffssb2mlvwmrc script that builds styles & menus for FFSSBs (Firefox-Specific Site Browsers). So, I'm pretty comfortable with the process now.
In looking at the location & format of *.desktop files -- on OpenBSD, at least -- I have the following notes:
- X11 application
*.desktopfiles are installed to/usr/local/share/applications/ - User-specific
*.desktopfiles (for example, those generated byffssb) are installed to~/.local/share/applications/ *.desktopfile format:- We would only want to parse application details, so those under the
[Desktop Entry]heading line - We would only want
Type=Application - We probably want to use the
Name=line's value, notGenericName= - The
Categories=line's value contains semicolon-delimited category names, which could be useful for generating sub-folder/sub-menu groupings (they do seem to be inconsistent though) - The
Icon=line's value is the name of the icon file name, less the type/extension, to search for - The
Exec=line's value is the command to be executed (they can contain%substitution variables, which we'd just want to strip out)
- We would only want to parse application details, so those under the
- Icons:
- The icon files are installed to
/usr/local/share/icons/(it looks like thehicolorfolder is the default we'd want to search first, especially/usr/local/share/icons/hicolor/16x16/apps/and/usr/local/share/icons/hicolor/scalable/apps/) - User-specific icon files are installed to
~/.local/share/icons/(similar structure to above) - While icons can be in
*.xpmformat, most are in.pngor.svg, so would need to be converted to.xpm
- The icon files are installed to