How to remove/add items from this Dash to Panel context menu?
Opened this issue · 1 comments
Describe the idea or feature you'd like
I would like to be able to remove/add items from this Dash to Panel context menu.
Is your feature request related to a problem? Please describe.
Elements are unnecessary or necessary.
To remove it, just comment out the individual items from this piece of code in the file ~/.local/share/gnome-shell/extensions/dash-to-panel@jderose9.github.com/appIcons.js
:
this._appendItem({
title: _('Terminal'),
cmd: [TERMINALSETTINGS.get_string('exec')]
});
this._appendItem({
title: _('System monitor'),
cmd: ['gnome-system-monitor']
});
this._appendItem({
title: _('Files'),
cmd: ['nautilus']
});
this._appendItem({
title: _('Extensions'),
cmd: ['gnome-shell-extension-prefs']
});
this._appendItem({
title: _('Settings'),
cmd: ['gnome-control-center']
});
this._appendList(
SETTINGS.get_strv('panel-context-menu-commands'),
SETTINGS.get_strv('panel-context-menu-titles')
)
this._appendSeparator();
let lockTaskbarMenuItem = this._appendMenuItem(SETTINGS.get_boolean('taskbar-locked') ? _('Unlock taskbar') : _('Lock taskbar'));
lockTaskbarMenuItem.connect('activate', () => {
SETTINGS.set_boolean('taskbar-locked', !SETTINGS.get_boolean('taskbar-locked'));
});
let settingsMenuItem = this._appendMenuItem(_('Dash to Panel Settings'));
settingsMenuItem.connect('activate', () => DTP_EXTENSION.openPreferences())
if(this.sourceActor == Main.layoutManager.dummyCursor) {
this._appendSeparator();
let item = this._appendMenuItem(this._dtpPanel._restoreWindowList ? _('Restore Windows') : _('Show Desktop'));
item.connect('activate', this._dtpPanel._onShowDesktopButtonPress.bind(this._dtpPanel));
}
How to add, I haven't checked, I don't know if there is support for names for different languages.
I would like to have that feature too.
For example, I would like to replace "System Monitor" with "Mission Center" because I find that tool much better, with the familiar interface and actions. I also want to be able to access it through the context menu, just like in Windows 10.