Mac Apps

Upgrade your Spotlight searches with Alfred

Locating and opening a file, folder or application isn’t exactly difficult, but since it’s one of the most common tasks you’ll perform on your Mac, anything that can make this process even slightly easier is going to be a real time-saver.

Alfred is a productivity app that lets you locate and launch any file, folder, application or utility from a Spotlight-style search bar that you can open at any time using a keyboard shortcut. This may sound like a minor tweak, but when you consider how many files, folders and applications you launch during a typical Mac session, this one small change has the potential to save you a significant amount of time and effort in the long run.

In this article, I’ll show you how to get started with this powerful productivity app, and introduce you to all the keywords you’ll need, in order to locate and launch any item, anywhere on your Mac. I’ll also be exploring some of Alfred’s other productivity features, including using Alfred to search any website, directly from its Spotlight-style search bar.

Setup Alfred

To get Alfred up and running on your Mac:

  • Head over to the Alfred website and download the latest version.
  • Once it’s finished downloading, launch the Alfred.dmg file and follow the onscreen instructions to install.
  • Launch the Alfred app. By default, Alfred takes you to its ‘Preferences…’ screen; you can return to this screen at any time by selecting the little Alfred logo in your Mac’s menu bar (i.e the little top hat icon) and then selecting ‘Preferences…’ from the dropdown menu.
  • This app will request permission to access your contacts, which will help Alfred refine its results and suggestions. Unless you have a specific reason for wanting to keep this information private, you’ll generally want to grant Alfred permission to access this data.

At this point, Alfred is installed and ready to use, but while we have the ‘Preferences’ window open there’s a few extra steps you can take, in order to ensure you’re getting the most out of Alfred.

Launch automatically at startup

You can only call the Alfred search bar to the foreground if Alfred is already open, so for the best results you should set this application to launch automatically at startup:

  • Make sure the ‘General’ tab is selected.
  • Select the ‘Startup’ checkbox.

If you change your mind at any point and want to prevent Alfred from launching at startup, then navigate back to Alfred’s ‘Preferences… > General’ window. Alternatively:

  • Launch your Mac’s ‘System preferences…’
  • Select ‘Users & Groups.’
  • Choose your user account from the left-hand menu.
  • Select the ‘Login items’ tab.
  • Find ‘Alfred’ and deselect its accompanying checkbox.

Select a new keyboard shortcut

As long as Alfred is running in the background, you can call its search bar to the foreground at any time using the ‘Alt + Space’ keyboard shortcut.

If you’d prefer to use a different shortcut, then Alfred supports any combination of ctrl, alt, or cmd and space/character. Note that you must use at least one modifier and key in your keyboard shortcut, and you cannot use a combination of keys that’s already used elsewhere on your Mac.

To use a different keyboard shortcut:

  • Launch Alfred’s ‘Preferences…’ window and select the ‘General’ tab, if you haven’t already.
  • Click the ‘Alfred Hotkey’ text field.
  • Press the combination of keys that you want to use, to create your shortcut.

Set your location

Alfred can provide you with more accurate results and suggestions if it knows where you are in the world, for example if you set your location as ‘UK’ then Alfred will use Google.co.uk, rather than Google.com.

To set your location:

  • Inside ‘Preferences… > General,’ open the ‘Where are you’ dropdown.
  • Select your location from the list.

Now that Alfred’s setup, let’s explore some of the ways that Alfred can make your life easier.

Launch an application

To quickly and easily launch any application that’s installed on your Mac:

  • Call Alfred into the foreground, using your keyboard shortcut.
  • Start typing the name of the application that you want to launch.
  • As soon as the application appears, click the little ‘Return’ icon to launch it, or press the ‘Return’ key on your keyboard.

Locating and launching files

To find a file or folder:

  • Call Alfred to the foreground.
  • Type “find,” followed by the name of the file or folder that you want to locate.
  • When the item appears in Alfred’s list, give it a click, or press the ‘Return’ key on your keyboard.

To launch a file:

  • Type “open” in the Alfred search bar, followed by the name of the file that you want to open.
  • When the file appears in the list, select it or press ‘Return.’

Alternatively, you can open a file or launch an application by calling the Alfred search bar to the foreground, and then pressing the space bar followed by the name of the file or application that you want to open.

Use the calculator

You can perform all the standard mathematical calculations, by typing them directly into the Alfred search bar. The following calculations are supported:

  • Additions, for example typing 5+2= into the search bar, will give you 7.
  • Subtractions, for example 5-2= will return 3.
  • Multiplications, for example 5*2= will return 10.
  • Divisions, for example 5/2= will give you 2.5.

Definitions and spelling

Alfred integrates with macOS’ built-in Dictionary to provide you with definitions and spell-checking functionality:

  • To view the definition of a word, simply type the keyword “define,” followed by the word you’re unsure about. Alfred will display a snippet of the definition in its dropdown menu, but you can view the full definition by pressing the ‘Return’ key on your keyboard.
  • To check the spelling of a word, type the keyword “spell,” followed by the word you’re unsure about. Alfred will display one or more potential matches for this word, although depending on the complexity of the word (or how far you are off the mark!) you may need to experiment with a number of different spellings, before Alfred is able to correctly identify the word you had in mind.

Perform web searches

Alfred comes with a long list of keywords that let you perform searches on popular websites such as Google, Twitter, Facebook and Google Maps, directly from the Alfred search bar.

To view all the keywords that Alfred supports:

  • Launch Alfred’s ‘Preferences’ menu by clicking the little Alfred icon in your Mac’s toolbar, and then selecting ‘Preferences…’
  • Select the ‘Features’ tab.
  • In the left-hand menu, select ‘Web search.’

This window displays all of Alfred’s ready-made keywords and their associated action, for example the keyword “Twitter” performs the “Search Twitter for (query)” action. Let’s imagine you wanted to perform a Twitter search for the word “Apple.” In this scenario, you’d:

  • Bring the Alfred search bar to the foreground using your keyboard shortcut.
  • Type “Twitter Apple,” and then select “Search Twitter for Apple” when it appears in the list.
  • Your Mac will now open a new tab in your default browser, load Twitter, and perform a search for the word “Apple.”

Alfred supports a long list of keywords by default, but if your favourite website isn’t included in this list, then you can create your own, custom keyword(s):

  • Click the ‘Add custom search’ button (where the cursor is positioned in the following screenshot).

  • At this point you’ll need to specify the search URL. The easiest method, is to navigate to the website in question, search for any word, and then copy/paste the resulting URL into Alfred’s ‘Search URL’ field.
  • Find your search query in the pasted URL, delete it, and then replace it with the term {query}.
  • Give this keyword a title that’ll help you identify the task that it performs, for example: Search Chriswrites.com for {query}.
  • Type the keyword that’ll perform this action.
  • Click ‘Save.’
  • The new keyword should now appear in Alred’s ‘Web Search’ list. To activate this keyword, select its accompanying ‘Enabled’ checkbox.
  • Put your keyword to the test, by opening the Alfred search bar, and entering your keyword followed by the search term. Alfred should respond by opening a new tab, loading the website in question, and then returning the results of your search.

If at any point you want to make some changes to your custom keyword:

  • Navigate to ‘Alfred > Preferences… > Web Search.’
  • Select your custom keyword from the list.
  • Click the ‘Edit custom search’ button.
  • Make your changes, and then click ‘Save.’

Purchase a Powerpack

If you enjoy the features that Alfred offers for free, then you may want to consider upgrading by purchasing a “powerpack,” which includes additional features not available in the free version of Alfred. These features include the ability to control and search your iTunes collections, support for custom filters, and a fully-searchable clipboard. You can learn more about the Powerpack upgrade, at the official Alfred website.

About the author

Jessica Thornsby

Jessica Thornsby is a technical writer based in Sheffield. She writes about Android, Java, Kotlin and all things Apple. She is the co-author of O'Reilly's "iWork: The Missing Manual," and the author of "Android UI Design," from Packt Publishing.

Add Comment

Click here to post a comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.