About Alfred: What you need to know

I’ve been using Alfred for several years and believe it is a powerful tool. I summarize my most used features for your reference and perhaps to help the follower.

Alfred is my primary entry for searching and querying on my Mac. Every operation I perform start from this single input box.

Instructions

The following tutorial applies to Alfred 4/5

let’s start!

Replace Spotlight

Although the built-in Spotlight on Mac is quite good, Alfred is more powerful. As the saying goes, “Two tigers cannot share one mountain,” so I had to disable the Spotlight.

Configuration

  • Settings -> Keyboard, uncheck Spotlight shortcut
  • Settings -> Dock, select Automatically hide and show the Dock
  • Alfred -> Hotkey settings, recommended double ⌘, and choose to login

After setting this up, you’ll find your desktop much cleaner. Double-tap ⌘ to bring up the Alfred input box, and everything starts from here, even launching various apps can be easily done from here.

For frequently used website search services, you can configure them as searches. For example, I often search on JD and NPM, so I configured them. In the future, I just need to invoke Alfred, enter the keyword, and press Enter to go directly to the search results page of the related website.

Configuration

How it works

For example, I often need to find files, and it’s really inconvenient to look through Finder all the time. Here’s what you need to do: invoke Alfred, enter ' or a space, then type part of the file name and press Enter to open it. Or press ⌘ ⏎ to open it in Finder.

https://static.1991421.cn/2020/2020-04-05-111216.gif

Notes

  1. Supports files and folders; by default, pressing ⏎ opens folders.
  2. ‘ is an English character, and the Chinese characters don’t work, so using space is more convenient.
  3. Press ⌥ and Enter to open the selected item in Finder.
  4. When searching for an app, if you want to browse the list of recently opened files, just press ➡️ when selecting a specific app, choose recent documents, then ➡️.

Web Bookmarks

I previously didn’t pay much attention to this feature, but now I use it frequently. Essentially, it syncs the browser bookmark records. In the past, opening a webpage required going to the browser, finding the bookmark, and pressing Enter to browse. Now, when you enter something, it directly matches the bookmark URL. Select the target URL and press Enter.

For example, I bookmarked the Redux URL https://github.com/camsong/redux-in-chinese in Chrome. Now, to open it, I just do this:

How it works

Clipboard History

Sometimes, you need to copy messages, usernames, or passwords from WeChat and use them on a website. Switching windows for copy-pasting is inefficient. This feature can temporarily save multiple clipboard entries, allowing selective pasting, and significantly improving efficiency.

How it works

Calculator

For daily calculations, you can directly perform calculations in the input box without opening a separate calculator.

Contacts

Quickly search contact information, make phone calls, or send text messages.

To make it user-friendly, consider the following settings:

  1. Use Spotlight to search for data

    If not selected, some contacts may not appear even though they are in the address book.

  2. Customize action settings, such as supporting sending text messages. Since phone calls are infrequent, I added modifier key configurations.

Music

I don’t like Apple Music, so I chose to disable this feature.

https://static.1991421.cn/2022/2022-07-31-124355.jpeg

For other music apps like Spotify, you need to download workflows to use them.

Snippets

This feature is also a magical tool. It triggers text expansion by entering specific text keywords. For example, I often need to enter addresses in many places, which is annoying. Using Snippets solves this problem.

Configuration

Effect

Notes

  • Prefixing is important to avoid unnecessary text expansion. Snippets support some variables like dates, which are very useful. For example, I write a Snippet to record the start time for daily project code review meetings.
  • Too many keywords can be hard to remember, so for low-frequency ones, do not enable keyword expansion. Instead, use the history panel or snippet keyword search to trigger them.

1Password

Integrating with 1Password allows quick access to stored websites and automatically supports auto-filling login credentials.

Settings

  1. You need to enable third-party integration in 1Password; otherwise, Alfred will show Unable to find 1Password Data at the bottom of the page.

  2. Enable bookmark search in Alfred

    https://static.1991421.cn/2022/2022-02-19-214231.jpeg

  • Do not click Show in default results.

  • Click Advanced, and enable Discover Automatically. This way, you don’t need to manually enter the 1P data path.

  • Alfred v5 no longer includes built-in support for 1Password8. You need to install a workflow to resolve this. For more details, click here.

Effect

https://static.1991421.cn/2019-06-09-Jun-09-2019%2022-29-45.gif

System Command

This is also quite good, such as locking the screen, restarting, ejecting disks, and other common commands.

Previously, I encountered an issue where typing “lock” and pressing Enter didn’t lock the screen. I discovered it was due to a conflict with a shortcut key in QQ. To resolve this, I simply removed the QQ shortcut key settings. For more information on this issue, you can visit here.

Terminal

You can also directly enter terminal commands in Alfred. This is particularly useful for programmers. If you are not a programmer, you can skip this section.

Settings

Since I usually use iTerm2 instead of the system terminal, some configuration is needed. For the setup details, please visit here.

Note: Integration only solves the quick browser access to 1Password stored sites. The actual account and password entry still requires the browser's own 1Password integration.

Effect

Workflows

The above features are not the most powerful; the most powerful feature is the workflow.

Official Store

Alfred has finally launched an official store. Visit it to search the workflow, click to install, and it will prompt the local Alfred to install.

https://static.1991421.cn/2024/2024-03-17-123345.jpeg

Here are a few workflows I frequently use:

Not Enough? Write Your Own!

For the workflows I’ve written, you can visit here. Unknowingly, I have written over 40 workflows. Kudos to myself 🍗.

Other Issues

Disable Shift Preview

In Alfred’s input box, pressing Shift will previews the currently selected item. but switch input method’s is default as Shift, it can be annoying. Here’s how to solve it:

Using Terminal Output as the Next Input

For example, if the terminal output is 111, can 111 be used as a parameter for the next command? Yes, it can. For example, in bash, you need to echo the output, and in JS, you need to use the console.log to output.

Excluding Specific Apps from Clipboard History Trigger

As a developer, I often use IDEs like IDEA and DataGrip, which also have clipboard histories with the default shortcut ⌘ ⇧ V. I habitually want to set Alfred’s global clipboard shortcut to the same, but if I set it, it will disable the feature in the IDEs. How to solve this?

Firstly, Alfred’s clipboard history currently only has settings to exclude copying content from specific apps, not excluding specific apps from triggering the hotkey. So, here is a workaround.

  1. Delete the original clipboard hotkey.
  2. Create a hotkey workflow, set the trigger key as ⌘ ⇧ V.
  3. Configure the related apps (IDEA, DataGrip) so that the hotkey is only triggered when these apps are not focused.
  4. Create a Key Combo and set the hotkey to ⌥ ⌘ ⇧ V. The more complex, the better.
  5. Set the clipboard hotkey to ⌥ ⌘ ⇧ V.

By this way, when not focusing on IDEA or DataGrip, pressing ⌘ ⇧ V triggers Alfred’s clipboard history. When in IDEA or DataGrip, it continues to use the software’s built-in clipboard history. Same shortcut, different clipboard histories. Perfect!

Setting Alfred’s Default Keyboard Language

Since Alfred’s commands are all in English, even searching for Chinese filenames can be done using pinyin, so it’s more convenient to set Alfred’s default language to English. Otherwise, every time you invoke Alfred, you’ll need to press ⇪ to switch the input method, which is very inconvenient.

Fortunately, Alfred supports default language settings.

Notes

  • The default is EN, but you can still using ⇪ to switch the keyboard languages.
  • If this option is empty, it will use the current system keyboard language.

Double Tap Hotkey Settings

Double tap hotkey only supports specific modifier keys [⌃ ⌥ ⌘ ⇧ ]. For example, double tapping t is not supported.

Why Design It This Way

Because actions like double tapping t are very common, implementing double tap T to trigger an action would conflict with daily operations.

Alfred Proxy Settings

Some workflow services use foreign services like GitHub/Google. To use them properly, proxy settings are needed. In this way, Alfred will use the system proxy, or you can specify the exact proxy service address. For more proxy questions, you can check here: https://github.com/alanhg/alfred-workflows/discussions/199

Sync Settings

As mentioned above, the tools we meticulously refine are not easy. If the system is damaged or the software crashes due to an error, it is possible to lose the configuration. To ensure safety, suggest backing up your settings. I recommend using DropBox, which gives 2GB of space when registration for free, which is.

Settings: Go to Advanced => Sync => Select the synced folder.

https://static.1991421.cn/2022/2022-08-06-234054.jpeg

Notes

  • Both Alfred and I do not recommend using iCloud.
  • Some settings like Alfred launch hotkeys and proxy settings will not sync.

Preview Version Download - Early Access

In the Update interface, select pre-releases from the dropdown menu.

If you want to search for a specific workflow or snippet, enter ? followed by the keyword to search. The search range will cover all settings in Alfred.

Anything Else?

Let’s Wait.

  • There are too many features to cover in one article. For more usage tips, click here.
  • For my workflows, click here.
  • Follow the official forum, and click here.

Limitations of Alfred

The features mentioned above cover all aspects of Alfred, and you can explore various extensions to see what else it can do. However, here are some limitations of Alfred:

  1. Alfred’s design limits its triggers to a combination of hotkeys and specific text snippet expressions. It cannot be a menu item, meaning its entry points are fixed. For example, if I want to add a right-click menu item in Finder to copy the current directory path, can I do it? No, but you can achieve it with hotkeys. However, it’s unrealistic to remember so many hotkeys.
  2. All triggers are instantaneous. If I want to schedule opening a webpage or sending an email, can Alfred do it alone? Clearly, it’s unrealistic.

Supplementary Software

These two points are its design shortcomings or design ceilings. Here are two recommended software to complement its deficiencies:

  1. Automator (Built-in)
  2. Hammerspoon (Open-source and free)

Windows Platform?

Alfred only supports Mac and has no plans for Windows. If you want a similar experience on Windows, here are a few options. You can choose by yourself.

  1. https://u.tools
    • Supports plugin development in JavaScript
  2. http://www.wox.one/
    • It supports plugin development in any language, but C# and Python are the most convenient
    • Open-source

Powerpack License Purchase

License purchase is explained at the end of this article. If you find it essential, you can buy it.

  1. I recommend purchasing from the official website. The price is €34 for a single-user license (approximately 246.377 CNY) or €59 for a lifetime license (approximately 427.536 CNY). If you’re unfamiliar, start with the single-user license and upgrade to the lifetime license if you like it.
  2. The license has a limit on the number of activated devices:
    • Single-user license: 2 devices
    • Lifetime license: 4 devices

At the end

After writing so much, one thing is clear: Alfred is a must-have tool for efficiency enthusiasts. What’s more to explore? Just play around and find more details.

Here’s my usage report:

Reference