Skip to content

GNOME extension to run shell commands from a top bar drop-down menu.

License

Notifications You must be signed in to change notification settings

StorageB/custom-command-menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom Command Menu

A GNOME extension to run shell commands from a drop-down menu.

Custom Command Menu is an extension for GNOME 45/46 to run user defined commands by selecting them from a drop-down menu at the top bar.

Screenshot-main


Features

  • 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.
  • Support for up to 20 commands.

Installation

Recommended

Browse for and install this extension through the GNOME Extension tool or install through the GNOME Extensions website.

Manual

  1. Download the custom-command-menu.zip file of the latest release.
  2. Run the following command from the terminal: gnome-extensions install --force custom-command-menu.zip
  3. Logout and login.

Configuration

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 icons to use: https://github.com/StorageB/icons/blob/main/GNOME46Adwaita/icons.md

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.

Screenshot-commands

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.
  • Sudo commands require a password input from the terminal, so they will not directly work by themselves since commands run without a terminal window by default. However, you can use gnome-terminal -- command to run the command in the terminal. For example, gnome-terminal -- sudo apt-get update will open a terminal, prompt for your password, and then run the command.

Contributing

Contributions are welcome! Feel free to open an issue to request new features or submit a pull request to contribute to this project.


License

This project is licensed under the GNU General Public License.


I hope you found this extension helpful!

Buy Me A Coffee

About

GNOME extension to run shell commands from a top bar drop-down menu.

Resources

License

Stars

Watchers

Forks

Packages

No packages published