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

How to remove/add items from this Dash to Panel context menu? #2151

Open
look997 opened this issue Aug 1, 2024 · 1 comment
Open

How to remove/add items from this Dash to Panel context menu? #2151

look997 opened this issue Aug 1, 2024 · 1 comment

Comments

@look997
Copy link

look997 commented Aug 1, 2024

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.

Additional context
image

To remove it, just comment out the individual items from this piece of code in the file ~/.local/share/gnome-shell/extensions/[email protected]/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.

@RealEmreSen
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants