Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tool to automatically generate applications submenu for Apple menu #6

Open
morgant opened this issue Jan 8, 2023 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@morgant
Copy link
Owner

morgant commented Jan 8, 2023

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:

Also, MenuMaker (python) could be updated to add mlvwm support.

@morgant
Copy link
Owner Author

morgant commented Nov 20, 2024

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 *.desktop files are installed to /usr/local/share/applications/
  • User-specific *.desktop files (for example, those generated by ffssb) are installed to ~/.local/share/applications/
  • *.desktop file 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, not GenericName=
    • 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)
  • Icons:
    • The icon files are installed to /usr/local/share/icons/ (it looks like the hicolor folder 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 *.xpm format, most are in .png or .svg, so would need to be converted to .xpm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant