Linux Mint 19 Cinnamon
Hello everyone,
when I right-click on the panel launchers (e.g. Firefox), the applications-specific functions (e.g. Open a New Window, Open a New Private Window) are all the way on top, with the general functions (Launch, Add, Edit, Remove, Preferences) being closer to the task bar. Is it possible to change this order? I am usually using the application-specific functions and would like them closer to the task bar for faster access.
Basically, I would like to change it from this:
to this:
Greetings,
Arnad
SOLVED Reorder panel launcher order (right-click menu)
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
SOLVED Reorder panel launcher order (right-click menu)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Reorder panel launcher order (right-click menu)
You don't say which DE version you're using but I've never heard of this in any Linux DE. Linux is highly configurable but all that stiuff about you being able to do anything you want in Linux ain't true. In any case I suspect such a feature would slow the machine down more than you clicking the right item so there wouldn't be any point anyway really.
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
Re: Reorder panel launcher order (right-click menu)
Edited the original post to include my version: Linux Mint 19 Cinnamon.
Why would it slow the machine? The order it is in currently must be configured in some file, so changing this should change the order, no? I am not averse to digging into config files or recompiling stuff if necessary.
- smurphos
- Level 18
- Posts: 8501
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: Reorder panel launcher order (right-click menu)
Hi - this is a relatively straightforward edit of the panel-launcher applet's javascript.
1) Make a copy of the original applet in your local users applet folder
2) Open
3) Navigate to this section and reorder as you wish. Save and then restart Cinnamon with
Original...
E.g to move the application specific settings to the bottom of the list it would be
1) Make a copy of the original applet in your local users applet folder
cp -r /usr/share/cinnamon/applets/panel-launchers@cinnamon.org ~/.local/share/cinnamon/applets
2) Open
applet.js
in a text editor.xed ~/.local/share/cinnamon/applets/panel-launchers@cinnamon.org/applet.js
3) Navigate to this section and reorder as you wish. Save and then restart Cinnamon with
Ctrl-Alt-Esc
Original...
Code: Select all
class PanelAppLauncherMenu extends Applet.AppletPopupMenu {
constructor(launcher, orientation) {
super(launcher, orientation);
this._launcher = launcher;
let appinfo = this._launcher.getAppInfo();
this._actions = appinfo.list_actions();
if (this._actions.length > 0) {
for (let i = 0; i < this._actions.length; i++) {
let actionName = this._actions[i];
this.addAction(appinfo.get_action_name(actionName), Lang.bind(this, this._launchAction, actionName));
}
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
}
let item = new PopupMenu.PopupIconMenuItem(_("Launch"), "media-playback-start", St.IconType.SYMBOLIC);
item.connect('activate', Lang.bind(this, this._onLaunchActivate));
this.addMenuItem(item);
item = new PopupMenu.PopupIconMenuItem(_("Add"), "list-add", St.IconType.SYMBOLIC);
item.connect('activate', Lang.bind(this, this._onAddActivate));
this.addMenuItem(item);
item = new PopupMenu.PopupIconMenuItem(_("Edit"), "document-properties", St.IconType.SYMBOLIC);
item.connect('activate', Lang.bind(this, this._onEditActivate));
this.addMenuItem(item);
item = new PopupMenu.PopupIconMenuItem(_("Remove"), "window-close", St.IconType.SYMBOLIC);
item.connect('activate', Lang.bind(this, this._onRemoveActivate));
this.addMenuItem(item);
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
let subMenu = new PopupMenu.PopupSubMenuMenuItem(_("Preferences"));
this.addMenuItem(subMenu);
item = new PopupMenu.PopupIconMenuItem(_("About..."), "dialog-question", St.IconType.SYMBOLIC);
item.connect('activate', Lang.bind(this._launcher._applet, this._launcher._applet.openAbout));
subMenu.menu.addMenuItem(item);
item = new PopupMenu.PopupIconMenuItem(_("Configure..."), "system-run", St.IconType.SYMBOLIC);
item.connect('activate', Lang.bind(this._launcher._applet, this._launcher._applet.configureApplet));
subMenu.menu.addMenuItem(item);
item = new PopupMenu.PopupIconMenuItem(_("Remove '%s'").format(_("Panel launchers")), "edit-delete", St.IconType.SYMBOLIC);
item.connect('activate', Lang.bind(this, function() {
AppletManager._removeAppletFromPanel(this._launcher._applet._uuid, this._launcher._applet.instance_id);
}));
subMenu.menu.addMenuItem(item);
}
Code: Select all
class PanelAppLauncherMenu extends Applet.AppletPopupMenu {
constructor(launcher, orientation) {
super(launcher, orientation);
this._launcher = launcher;
let appinfo = this._launcher.getAppInfo();
let item = new PopupMenu.PopupIconMenuItem(_("Launch"), "media-playback-start", St.IconType.SYMBOLIC);
item.connect('activate', Lang.bind(this, this._onLaunchActivate));
this.addMenuItem(item);
item = new PopupMenu.PopupIconMenuItem(_("Add"), "list-add", St.IconType.SYMBOLIC);
item.connect('activate', Lang.bind(this, this._onAddActivate));
this.addMenuItem(item);
item = new PopupMenu.PopupIconMenuItem(_("Edit"), "document-properties", St.IconType.SYMBOLIC);
item.connect('activate', Lang.bind(this, this._onEditActivate));
this.addMenuItem(item);
item = new PopupMenu.PopupIconMenuItem(_("Remove"), "window-close", St.IconType.SYMBOLIC);
item.connect('activate', Lang.bind(this, this._onRemoveActivate));
this.addMenuItem(item);
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
let subMenu = new PopupMenu.PopupSubMenuMenuItem(_("Preferences"));
this.addMenuItem(subMenu);
item = new PopupMenu.PopupIconMenuItem(_("About..."), "dialog-question", St.IconType.SYMBOLIC);
item.connect('activate', Lang.bind(this._launcher._applet, this._launcher._applet.openAbout));
subMenu.menu.addMenuItem(item);
item = new PopupMenu.PopupIconMenuItem(_("Configure..."), "system-run", St.IconType.SYMBOLIC);
item.connect('activate', Lang.bind(this._launcher._applet, this._launcher._applet.configureApplet));
subMenu.menu.addMenuItem(item);
item = new PopupMenu.PopupIconMenuItem(_("Remove '%s'").format(_("Panel launchers")), "edit-delete", St.IconType.SYMBOLIC);
item.connect('activate', Lang.bind(this, function() {
AppletManager._removeAppletFromPanel(this._launcher._applet._uuid, this._launcher._applet.instance_id);
}));
subMenu.menu.addMenuItem(item);
this._actions = appinfo.list_actions();
if (this._actions.length > 0) {
for (let i = 0; i < this._actions.length; i++) {
let actionName = this._actions[i];
this.addAction(appinfo.get_action_name(actionName), Lang.bind(this, this._launchAction, actionName));
}
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
}
}
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Re: Reorder panel launcher order (right-click menu)
That worked exactly as advertised! Thank you very much. I was even able to add a separator between preferences and the application-specific options.