How to Add New Items in macOS Context Menu
Do you have a command or a set of tasks you execute regularly or repeatedly on your Mac (I.e., Convert .jpg to .png, or convert documents to pdf, etc.)?
How about creating the action, adding it to the right-click context menu, and executing them on the fly?
In this post, I’ll show you how to do that exactly. The things we are going to cover are:
- How to create a custom action in the Context Menu,
- How to add a shortcut key to the custom action, and lastly
- How to find and delete the created custom action.
Read Also: 100 Free Useful Mac Apps
Video tutorial:
Custom Action: Replace Space with Dash
As an example for this tutorial, we will create a custom action that replaces spaces in a filename (Example: lorem ipsum dolor.jpg) with dashes (Example: lorem-ipsum-dolor.jpg).
To execute the command, you just need to select the file (or files), right-click, and select the custom action created.
Let’s get started.
1. Create Custom Action in Context Menu
- Launch Automator app. You can either do a quick Spotlight search for Automator, or find the app inside Macintosh HD > Applications > Automator.app.
- Select Quick Action in Automator app.
- Search for "Rename Finder Item" in the search box, then drag it to the right panel. You can also find it under Library > Files and Folders on the left panel.
- Click "Add" if this dialogue pops up.
- In "To" under Copy Finder Items, select the location you want the output to be saved. Check "Replacing existing files" if you want your output to replace any existing item.
- Replace "Add Date or Time" with "Replace Text" in "Rename Finder Items:".
- In "Find:", hit space key once to add a space, and in "Replace:", add a dash (-).
- Now, you will need to save the quick action created. Go to File > Save, give it a name, then click Save. For this tutorial, we will call it – Replace Space with Dash.
That’s it! A Quick Action named Replace Space with Dash has been successfully created.
Test the Custom Action
Now, let’s test it to see if it works.
- Create a file on your Desktop. It can be an image or any doc format.
- Left click once to select it, then right click to access the context menu.
- Navigate to "Quick Actions" and select "Replace Space with Dash".
- Check the newly created file. Spaces in its filename should be replaced with dashes.
2. Create Keyboard Shortcut for Custom Action
You can also create a keyboard shortcut for this action, making executing it even faster! To create a keyboard shortcut, do the following:
- Go to Apple > System Preferences.
- Select Keyboard, then go to the Shorcuts tab.
- Click Services, then look for the created Quick Action on the right panel.
- Click once to select the quick action, then click "Add Shortcut".
- Enter the shortcut key once, and hit Return.
And now, you can perform the custom Quick Action even faster with your keyboard shortcut.
3. Delete Custom Actions in Context Menu
If you’ve created too many items on your right-click context menu and wish to declutter them, you can too. To delete custom Quick Actions from your context menu, you will need to locate it first.
First, go to Apple > System Preferences, then select Extensions.
Select Finder on the left panel, and you should see the created quick actions on the right panel. Select it, then right-click and it give you the following options:
- Show in Finder — Locate where the quick action is stored
- Move to Bin — Delete it from context menu.