Custom Applications Menu

UUID: CustomApplicationsMenu@LLOBERA
Last edited:
1 month ago 2019-10-19, 17:00 UTC
Last commit: [7c2233d6] New Italian translations (#2634)

An applications drop-down list easily customisable

README

Close

Custom Application Menu

Description

This applet adds an icon in the cinnamon panel which toogle a list of applications when you click on the icon. This applications list is completly customisable. To edit the applications list, right click on the icon and select Edit.

Settings

The applications.json file is a data representation of the Custom Applications Menu. Each line represent an applications entry.

  • desktopFile: The name of a desktop file in the folder '/usr/share/applications' or '~/.local/share/applications'. Used to get the command, display name and icon name. These data won't override the command, display name or icon name if they are explicitly defined.
  • command: The command line to execute
  • iconName: The name of a themed icon or absolute path to an icon file, by default the 'image-missing' themed icon
  • displayName: The name displayed in the menu, by default the same as first word in command
  • active: true or false. Allow to deactivate an application. Useful because JSON doesn't allow comments.

Special command

{ "command":"S" } is used to create a separator

Special entry

menu may be used to create a sub-menu: { "displayName":"sub-menu", "iconName":"applications-internet", "menu": [ { "desktopFile":"firefox" }, { "desktopFile":"filezilla" } ]} By default the iconName is 'image-missing' and displayName is 'sub-menu'

non-ASCII characters

There is a problem with non-ASCII caracters in properties.

Icon

This application use an icon named "help-about". If you don't have an icon with this name in your icons theme, a question mark icon is displayed instead. You have 2 possibilities to change the icon:

  1. Copy the star icon in your icons folder: Copy the file "~/.local/share/cinnamon/applets/CustomApplicationsMenu@LLOBERA/icon.png" to "~/.icons" and rename it as "help-about.png". Then logout.

OR

  1. Change to an icon you already have in your icons theme: Go to "/usr/share/icons/" Take a look into folders and choose an icon you like. Open the file "~/.local/share/cinnamon/applets/CustomApplicationsMenu@LLOBERA/applet.js" Line 97 this.set_applet_icon_name("help-about"); Replace "help-about" by your icon name (without the extension). Then logout.

Log In To Comment!

3 Comments

Dragoş
Dragoş-4 months ago
OK, upon a closer look I saw the errors in the log are intentional, for debug purposes. My bad. The rest still stands though. Hopefully there will be improvements.
Dragoş
Dragoş-4 months ago
Agreed with Valery's comment, a settings GUI would be most useful. And/or the ability to drag'n'drop an item from the Start menu, file manager or any other possible place onto this applet's icon in the panel. Drag'n'drop menu items to rearrange would also be a plus. Until then there's a problem in applet.js, Loking Glass complains about redefining const _ and refuses to import applet.js: error t=2019-08-02T10:27:36Z [CustomApplicationsMenu@LLOBERA]: redeclaration of const _ [CustomApplicationsMenu@LLOBERA]: Error importing applet.js from CustomApplicationsMenu@LLOBERA Commenting the declaration of _ removes the error and the applet is loaded. Then there are those default items that may or may not be installed on one's system, and which generate errors in Looking Glass' log: error t=2019-08-02T10:58:03Z Desktop file geany not found. error t=2019-08-02T10:58:03Z Desktop file clementine not found. error t=2019-08-02T10:58:03Z Desktop file osdlyrics not found. error t=2019-08-02T10:58:03Z Undefined or unvalid command for item 3. error t=2019-08-02T10:58:03Z Desktop file filezilla not found. error t=2019-08-02T10:58:03Z Undefined or unvalid command for item 1. error t=2019-08-02T10:58:03Z Desktop file StarCraft II Wings of Liberty not found. error t=2019-08-02T10:58:03Z Undefined or unvalid command for item 1. error t=2019-08-02T10:58:03Z Desktop file urbanterror not found. error t=2019-08-02T10:58:03Z Undefined or unvalid command for item 2. It would be best to first check if the applications exist or if commands are valid before trying to load them in the menu. Granted those errors are invisible to the average user but still it would count for cleaner programming. Oh and is there a way to have submenus open automatically on hover (with a slight delay) instead of click? At least as an option. Maybe I'm too used to the Windows way but I find it a tad more convenient.
Valery Kravtsov
Valery Kravtsov-5 months ago
You suggest to an ordinary user to use JSON, really? How about a simple GUI instead?