How to Customize macOS Right-click Menu

Do you have a command or a set of tasks you execute regularly or repeatedly on your Mac? Want to keep them handy and execute them on the fly? In this post we’ll show you know. It’s all done within your Mac without the use of third-party applications or hacks. As a bonus, we’ll show you how to add a shortcut key, and how to delete everything you created.

The Mac operating system is known commonly known for it’s effciency in getting things done. But you can always kick productivity up a notch. We figured it would be great if commands or repetitive tasks we regularly do can be compiled (or packaged up) and excecuted within a command, or in the right-click menu.

To give you an idea of the long repetitive tasks we’d like to avoid, imagine this scenario where you have to convert folders upon folders of image files from PNG to JPG. Rather than booting up Photoshop or using a third-party app to do the job, why not just set it up in the right-click menu and run it with just a click?

Here’s how you do it. First we design the commands and the execution process with Automator. Then, we’ll put this into the right click menu for easy access and for fast execution. Here are two walkthroughs to get you started and to give you an idea of how this works.

Customize Contextual Menus with Automator

To give a clearer look at how powerful this customization is, we’re going to illustrate this with two examples. The first is to replace spaces with hyphens and secondly, we’ll show you how to setup a single click for png-to-jpg image conversion.

Example 1: Replace spaces in a filename with hyphens

  1. Start Automator from your Applications folder or Launchpad.
    menu automator
  2. Choose Service for your document.
    menu services
  3. At the right-hand panel, select "files or folders" in "Service receives selected".
    file or folder
  4. Then, at the left-hand panel, select Files & Folders > Rename Finder Items.
    rename finder items
  5. In the "Add Date or Time" panel, select Replace Text.
    replace text
  6. Replace all spaces with hyphens by putting in a space In "Find" and a hyphen In "Replace".
    space hypen
  7. Finally, go to File > Save. Insert a filename (e.g. Replace SPACE with -) and this will be the name used in the contextual menus too.
    save-as menu

That’s it! This service document will be saved in your Home > Library > Services folder and be ready for use.

replace result

Example 2: Convert PNG/TIFF/BMP Images to JPG Images

  1. Repeat Step 1 to 2 as above.
  2. At the right-hand panel, instead of text, this time we select "image files" in "Service receives selected".
  3. Then, at the left-hand panel, select Photos > Change Type of Images. Automator will prompt you to add a Copy Finder action, click Add. This is to ensure your original PNG images will remain and won’t be replaced by JPG images.
    change filetype
  4. Select a destination for your output files in "Copy Finder Items" panel. Choose JPEG in "Change Type of Images" panel.
    chagne image type
  5. After that, go to File > Save. Insert a filename (e.g. Save as JPG) and this filename will be used in your contextual menus.

Now, select any non-JPG image, right click and select the this service in contextual menus. And you will see all your selected images converted to .jpg extension.

save-as jpg

Bonus: Run it with a shortcut Key

We can run customized commands faster by assigning keyboard shortcuts with special commands to execute it on the fly. In fact, we’re going to show you how to run the customized commands that we’ve just created, using keys instead of right clicks.

  1. Go to System Preferences > Keyboard.
  2. On the left-hand panel, select Services. Then look for the customized command which we created earlier where we replaced empty spaces with hyphens. Click on the "add shortcut" button to add your preferred keyboard shortcut keys.
  3. Now, you can run a customized command by using keyboard shortcut keys you’ve set.

Bonus: how to remove contextual menu items

If for one reason or another, you want to remove items from the contextual menu you can 1. deactivate it or 2. remove the workflow file.

  1. To deactivate the command but still keep it in your Mac, go to System Preferences > Keyboard > Keyboard Shortcuts > Services. Uncheck the items you don’t want shown in the contextual menu.
    deactivate menu
  2. To remove the workflow file, in "Finder", choose Go > Go To Folder. Then, go to the folder ~/Library/Services. Here, you can remove the workflow file so it will be deleted and it won’t appear in contextual menu anymore.
    library menu


Designing an automation workflow doesn’t need any programming background. Mac’s Automator has made it extremely simple: just drag & drop actions from the selections, and save it as a workflow item in the right-click menu. Now you can fully utilize this trick to increase your productivity.

Show Comments