Custom Command Menu is an extension for GNOME 45/46/47/48 to run user defined commands from a customizable drop-down menu at the top bar.
- Run commands by selecting them from a drop-down menu at the top bar.
- Give each command entry a custom name and icon.
- Enter commands directly into the extension preferences window without the need for configuring any external files.
- Backup and restore the command list to an easily editable configuration file.
Browse for and install this extension through the GNOME Extension tool or install through the GNOME Extensions website.
- Download the custom-command-menu.zip file of the latest release.
- Run the following command from the terminal:
gnome-extensions install --force custom-command-menu.zip
- Logout and login.
From the extension's preferences, enter the terminal/shell commands to include in the drop-down menu and the associated display name for each command. If the name field is left empty, the command will not appear in the drop-down menu.
For a list of available symbolic icons to use refer to: GNOME default icons or Ubuntu Yaru icons
Alternatively, navigate to the icon directory for your system’s theme (located at /usr/share/icons), or use the Icon Library app.
Enter the name of the icon without the file extension. Note that icon appearance will vary depending on your systems's theme.
Command tips:
- Run multiple commands by using
&
between commands. - Chain multiple commands together to run one at a time using
&&
between commands. - By default, commands do not run in a terminal window and will not show any output or error messages. Test the full command first by running it in the terminal before adding it to the extension to verify it is correct.
- To run a command in a terminal window, use
gnome-terminal -- command
. Note that by default the GNOME terminal will close after the command is complete, but that can be changed in the terminal preferences if needed. - For sudo commands that require a password, use
pkexec
before the command to get a password prompt. For example,pkexec sudo command
will prompt for your password and then run the command. Alternatively, you can usegnome-terminal -- sudo command
to open a terminal where you can enter your password. - To open the command configuration window for this extension directly, use the command
gnome-extensions prefs [email protected]
.
The export option will save the current list of commands, along with their associated names and icons, to a commands.ini file in the user's home directory. The import option restores commands from the commands.ini file overwriting the existing list of commands.
Example commands.ini entry:
[Command 1]
Name=Hello world!
Command=notify-send "Custom Command Menu" "Hello world!"
Icon=face-smile-symbolic
This project is licensed under the GNU General Public License.