Custom Applications Menu

UUID: CustomApplicationsMenu@LLOBERA
Last edited:
5 months ago 2021-03-27, 11:24
Last commit: [88d1d0df] Hungarian Translation for Cinnamon Applets starting with the letter C (#3710)

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!

16 Comments

SDakaXvost
SDakaXvost-4 months ago
Hello! The applet icon is configured for use on the right side of the panel, in the tray. I want to use the applet instead of the main menu (I don't like it), on the left side. However, the icon size remains small. How can this size be changed?
didli
didli-7 months ago
I think there was an update (didn't pay it that much atention). Since this update, I lost all my custom menus (application.json revert to default). This is quite an issue ...
Nicolas
Nicolas-7 months ago
Hi guys, I am sorry to see you had problems with the applet. I made a new version (2.2) which should fix the issue.
lancerbailey
lancerbailey-9 months ago
I also had the issue of the applet loading for < 1 sec and disappearing/crashing. I commented out the line as recomended by Armando (ie: //const_=Gettext.gettext;) this is line 10 in the file ~/~/.local/share/cinnamon/applets/CustomApplicationsMenu@LLOBERA/applet.js cinnamon 4.2.4-1 Custom Applications Menu Applet version 2.1 (28-07-2019)
andreaiacoponi
andreaiacoponi-8 months ago
Is it working after commenting it? Warning? Which Mint version are you using?
lancerbailey
lancerbailey-8 months ago
i'm running cinnamon 4.2.4-1 centos 7, and yes after commenting out the "const_=..." line in applet.js the applet runs fine. previously i had the flash and crash experience.
Armando Basile
Armando Basile-9 months ago
to make the applet work I had to comment out the line // const _ = Gettext.gettext;
mdcclxv
mdcclxv-9 months ago
Thanks ... for nothing. Comment it where?!
andreaiacoponi
andreaiacoponi-10 months ago
Is there any chance to have the applet fixed for Mint 20? I would really love to bring with me this useful tool when I will move from Mint 19. Thank you!
thebritons
thebritons-1 year ago
Broken. It appears to load for <1 sec and then disappears/crashes.
Alekzsss
Alekzsss-1 year ago
doesn't work on Mint 19.3.
Dragoş
Dragoş-2 years 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.
Nicolas
Nicolas-1 year ago
I am happy to see you found your way through the errors you have had. If you have ideas of improvements, don't hesitate to share them.
Dragoş
Dragoş-2 years 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-2 years ago
You suggest to an ordinary user to use JSON, really? How about a simple GUI instead?
Nicolas
Nicolas-1 year ago
As a Linux fan, I am more into file configuration than GUI. I am not against a GUI configuration, you are free to build one to make this app more to your liking.