1, the preface

It has been a year and a half since I wrote two articles in 2018: Select Mac App and Mac development environment configuration. I received a lot of likes from students, and the last post Alfred advanced in High Efficiency was not written for various reasons, so it’s 0202!

A big part of macOS’s efficiency comes from a similar Unix/Linux lineage, and Alfred is one of the efficiency tools that you’ve probably heard of or already used. In short, Alfred replaces the clunky mouse with the clunky keyboard. There are many more efficiency methods, I’ll summarize them later, you can also search for macOS development efficiency, the blogger has written about some before. So why do you think Alfred is important to programmers? If you haven’t, you’ll understand by the end of this article. Although there are many tutorials of Alfred on the Internet, I haven’t found any relatively comprehensive or advanced articles, and many articles have a long history, so I just want to introduce some ideas and summarize myself. I hope we can work together to make submission more efficient!

  • Programmer’s macOS Series: Select Mac Apps
  • Programmer’s macOS series: Mac Development environment configuration
  • Programmer’s macOS series: Efficient Alfred Advanced

At present, I am planning to write three macOS series for programmers, which have been completed ✅, and I will update the following ideas

Alfred’s guide to improving programmers’ 100% productivity

Alfred 4 for Mac

Alfred is an award-winning app for macOS which boosts your efficiency with hotkeys, keywords, text expansion and more. Search your Mac and the web, And be more productive with Custom Actions to Control your Mac. Alfred is an award-winning macOS application that improves your productivity with hotkeys, keywords, text extensions, and more. Search for Mac and Web content, and control the Mac with custom actions to increase productivity.

Little Hat Alfred (read [‘ælfrid]) is a powerful productivity software for macOS! Known as a divine weapon! This post is based on Alfred 4.0.8 (Build 1135), which was updated on January 17, 2020, so if some features are missing due to a later release, please update to the latest version. If there are new features not mentioned in this version, please refer to the website for Alfred. Productivity App for macOS.

It is important to note that this article focuses on efficiency, not how to create Workflows, only those that work well. In addition, many of the online tutorials are based on 15 and 16 years, and the new tutorials are still based on one feature, and I kept thinking, how do you go from beginner to master Alfred? So, to get the full picture, I’m going to start with Alfred’s preferences and work your way down, with the whole feature in between. In addition, if the operation or process is simple, no screenshots are provided. So let’s get started!

General (General Settings)

  • Startup If this parameter is selected, Alfred will be automatically started when the system restarts.

  • Alfred Hotkey sets the keyboard shortcut that displays Alfred’s input field. I typically set it to Command + Space, the Apple key (⌘) and Space combo, A lot of people use command plus command or option plus option, double homkeys, which I don’t think are efficient enough. Because you have to double click to respond, and you’re still a beat behind!

  • Where are you set up all your countries or regions, the purpose is more user-friendly content, such as Google search or Ebai (ebay), China taobao, etc., currently for The China area has no effect.

  • Permissions click Request Permissions… Open permissions permissions that grant Alfred access to the system and computer:

The setting of this permission, in the following other issues summary further explained, because more, do not affect everyone to read, we first say the key!

The main Features are:

Default Results

  • ApplecationsSet the fuzzy search app name and whether to search for resources within the app, such as searchFish leongMay be inMusic.app. Second checkMatch Application’s keywords in default resultsIs used to match the application’s keyword metadata. Let’s take Apple’s music App as an example. You can see a column of keywords in the introduction:

The App adds these keywords so that when users search for them in Apps like Spotlight, Alfred, LaunchBar, etc., they match and display them. While this can be handy, it can also be disruptive to search results, so the new version of Alfred disables (unchecked) it by default. However, if you think it works well, you can re-check it yourself.

  • Essentials searches the contents of system preferences and contact information.

  • Extras searches for folders, documents, text files, images, compressed files, Apple scripts, and more. In the right side of the Advanced… Button, you can customize the format content, such as.mmap for mind maps and.md for Markdown files, and add the corresponding file types for Alfred to retrieve. Simply drag a file type that Alfred cannot retrieve to the box that pops up to add it.

  • Unintelligent searches for all types of files. (Not recommended)

  • Search Scope You can set the file space or directory to Search.

  • Fallbacks are used to set optional further actions to display if the search does not find results. As shown in the figure below, no result will be displayed when searching wq. The first two items are the search items provided by Alfred, and the rest are customized search. You can add or change the displayed operation items by yourself. Refer to the next section, Web Search, for the content of custom Search.

File Search

Fast and highlight search results for files by keyword.

The Search tag
  • You can quickly Search files by using the ‘spacebar’ or spacebar.

  • Opening Files opens the file directly (the default is open, without typing a keyword, searching for the file name and pressing enter). The default is OPEN, and I usually set it as op. After finding the file, click or press the shortcut key on the right to quickly open the file. Such as:

  • Revealing Files Opens the folder where the file is located. By default, find is used, and I usually set it as fd, fd + search term. After finding a file, click or press the shortcut key on the right to quickly open the folder where the file is located. (The graphic is omitted here, you can try it yourself.)

  • Inside Files Search Inside Files for content. The default search term is in, in + file content. After finding the file, click or press the shortcut key on the right to quickly open the file. (The graphic is omitted here, you can try it yourself.)

  • File Tags Search File Tags.

  • Don’t Show sets things like Emails, Bookmarks, Music, etc., that you Don’t search for.

  • Result Limit Number of search results to be displayed. The value can be 20, 30, or 40.

The Navigation TAB

Browse macOS’s file system in Alfred’s input field without having to navigate the Finder with a mouse. If you are familiar with the command line, there are two important symbols in Unix/Linux: / and ~. / represents the root directory of the file system, where all subfiles hang. ~ represents the current user directory, which contains all the information about the current user, and is the directory you can see in the sidebar when you open Finder. File browsing with Alfred is also based on these two symbols:

  • /Enter a slash (/) first in the Alfred field, which takes you to the macOS root directory.
  • ~Enter “~” first in Alfred, which will take you to the current user directory.
  • Filtering enables fuzzy search. For example, if there are some directories that we may not remember, such as Documents, Desktop, and Downloads directories, we can search d*n and use * to vaguely search.

  • Shortcuts Setting Shortcuts navigation. Use ← and → for Folder navigation: After this check box is checked, you can Use ←/→ (Left/Right key) to go to the upper or lower level directory. But Alfred’s default → (Right) key is to open Actions (the Actions panel, described later), so you can use Alfred’s default Command + Up and Command + Down to navigate if you don’t want to conflict with this feature. Or change the shortcut keys used by Actions, as described below. Use ↩︎ to open folders in Finder: When this check box is checked, pressing the Enter key will open the selected folders directly in the Finder.

  • This is where you can set hotkeys and keywords to go to the last open directory.

In the file navigation, the file list is on the left and the file preview is on the right. The new version adds a configuration menu in the lower right corner. Click the ⚙️️ icon to see these options:

  • Sort by name, creation date, and Modification date
  • Folder top
  • In reverse order, shortcut keys:⇧Shift + ⌘Command + S
  • To hide the preview panel, use the shortcut keys:⇧Shift + ⌘Command + I

Buffer tag

Multiple file selection caching operation, you can select multiple files from different folders, or perform the same operation on multiple files at the same time, and you can perform batch operations, such as opening, sharing, and deleting.

  • Alt + ↑ : add the file to the list;
  • Alt + ↓ : Adds the file to the list, and the cursor jumps to the next file.
  • Alt + ← : deletes the last file in the list.
  • Alt + → : Performs unified operations on list files.

Use the above shortcut keys to add a series of files to the file cache (the file cache is located above Alfred’s input box), and then use fn or CTRL or ⇥ (Alt + Right) to open the Actions to do the same.

  • Buffer Clearing Clears files from the cache after the operation is set, and clears them if they are not used for five minutes.

  • If Alt + arrow above conflicts with other actions, check this box and shift + Alft + arrow will be used to manipulate the file cache.

The Advanced (enhanced) TAB

Set advanced configuration items for file search. Default is good, generally do not need to pay attention to.

Actions (Actions)

  • Clicking fn or CTRL, ⇥, etc. on the selected File or directory can trigger additional Actions. See the File Actions TAB for details.

  • The Selection Hotkey allows you to set custom shortcuts to display actions.

  • If this option is selected, the most recent Action is ordered first. Otherwise, the order is ordered by default.

Schematic diagram of the effect of the operation:

Action action here is a Recent Documents… Enter the name of an App in Alfred’s input box, and then press fn or CTRL (the hotkeys set by Action) to open a list of actions about the App. The first option in the list is Recent Documents… This will show you a list of files that have recently been opened in the App, and you can select the files you want to open again with the App.

Take Xcode App as an example:

Other operations, everyone try! I’ll leave it out here because it’s too much.

Web Search

There are many web searches provided by Alfred, such as Google, Wiki, Bing, etc. However, for domestic users, they still need to customize Baidu, Zhihu and other Search. Click Add Custom Search in the lower right corner and Add the Search according to the prompted format.

Here with an example to illustrate the custom web search Settings, such as Swift, want to search the apple official document, the real link is https://developer.apple.com/search/?q=Swift, so every time they search the document content of apple, we are going to shoot the browser, To see the results, go to apple’s official documentation link and type Swift. However, this step can be integrated into one step using Aflred’s web Search function, so we need a Custom Search, click on the lower right corner of Aflred Add Custom Search, and then fill in the following information:

Need to explain here, https://developer.apple.com/search/?q= {query} {query} by Alfred in the input box input variables you need to search keywords, the Title is the default display above the clues, You can also upload an icon on the right to identify the search, Keyword as a shortcut to the search, AD (Apple Document) as a shortcut, and Validation to Test whether the search is working properly. Click the Test button on the right to Test. Click the Copy URL for Sharing button at the bottom left to Copy a string prefixed with Alfred :// to the system clipboard, and then share it with a friend. Paste it in Alfred and enter to import it. Example:

Here are some examples of urls for search engines:

  • Nugget search:https://juejin.im/search?type=all&query={query}
  • Brief Book Search:https://www.jianshu.com/search?utf8=%E2%9C%93&q={query}
  • Wechat articles:http://weixin.sogou.com/weixin?type=2&query={query}
  • Content of Zhihu:https://www.zhihu.com/search?type=content&q={query}
  • Apple Documentation:https://developer.apple.com/documentation/{query}
  • Taobao search:https://s.taobao.com/search?oe=utf-8&q={query}
  • Jd Search:https://search.jd.com/Search?enc=utf-8&keyword={query}
  • Making:https://github.com/search?utf8=%E2%9C%93&q={query}
  • StackOverflow:https://www.stackoverflow.com/search?q={query}
  • Almost:https://duckduckgo.com/?q={query}
  • IQIYI:https://so.iqiyi.com/so/q_{query}
  • Bilibili:https://search.bilibili.com/all?keyword={query}
  • Douban Station:https://www.douban.com/search?q={query}
  • Douban Movies:https://movie.douban.com/subject_search?search_text={query}
  • Minority:https://sspai.com/search/article?q={query}

In addition, when configuring the Search engine, the OpenSearch and SearchAction protocols on the website are used to automatically fill in the Search URL. You no longer need to find the keyword parameter position yourself and replace it with {query}. To add a Search engine, enter the domain name of the site in the Search URL text box, and then click Lookup on the right side to automatically analyze and display the available Search link format, and then click Use. Unfortunately, not all sites support the OpenSearch or SearchAction protocols. (you can use https://www.pinterest.com this experience.

Here are some bloggers’ custom web searches:

  • Nugget search:alfred://customsearch/Search%20Juejin%20for%20%27%7Bquery%7D%27/jj/utf8/nospace/https%3A%2F%2Fjuejin.im%2Fsearch%3Ftype% 3Dall%26query%3D%7Bquery%7D
  • Brief Book Search:alfred://customsearch/Search%20Jianshu%20for%20%27%7Bquery%7D%27/js/utf8/nospace/https%3A%2F%2Fwww.jianshu.com%2Fsearch% 3Futf8%3D%25E2%259C%2593%26q%3D%7Bquery%7D
  • Wechat articles:alfred://customsearch/Search%20Weixin%20for%20%27%7Bquery%7D%27/gzh/utf8/nospace/https%3A%2F%2Fweixin.sogou.com%2Fweixin %3Ftype%3D2%26query%3D%7Bquery%7D
  • Content of Zhihu:alfred://customsearch/Search%20Zhihu%20for%20%27%7Bquery%7D%27/zh/utf8/nospace/https%3A%2F%2Fwww.zhihu.com%2Fsearch%3Fty pe%3Dcontent%26q%3D%7Bquery%7D
  • Apple Documentation:alfred://customsearch/Search%20%EF%A3%BFDeveloper%20for%20%27%7Bquery%7D%27/ad/utf8/nospace/https%3A%2F%2Fdeveloper.appl e.com%2Fsearch%2F%3Fq%3D%7Bquery%7D
  • Taobao search:alfred://customsearch/Search%20Taobao%20for%20%27%7Bquery%7D%27/tb/utf8/nospace/https%3A%2F%2Fs.taobao.com%2Fsearch%3Foe %3Dutf-8%26f%3D8%26q%3D%7Bquery%7D
  • Jd Search:alfred://customsearch/Search%20JD%20for%20%27%7Bquery%7D%27/jd/utf8/nospace/https%3A%2F%2Fsearch.jd.com%2FSearch%3Fenc%3 Dutf-8%26keyword%3D%7Bquery%7D
  • Making:alfred://customsearch/Search%20Github%20for%20%27%7Bquery%7D%27/sh/utf8/nospace/https%3A%2F%2Fgithub.com%2Fsearch%3Futf8 %3D%25E2%259C%2593%26q%3D%7Bquery%7D
  • StackOverflow:alfred://customsearch/Search%20StackOverflow%20for%20%27%7Bquery%7D%27/so/utf8/nospace/https%3A%2F%2Fwww.stackoverflow.c om%2Fsearch%3Fq%3D%7Bquery%7D

For the custom search above, just paste the string in the Alfred input box (the string with the prefix Alfred ://) and press enter to import the custom search into your Own Alfred.

More search site you can collect ah ~

Web Bookmarks

Currently, Alfred supports bookmark search in Safari and Chrome.

  • To make it easier and faster to search for bookmarks, you can set the via keyword to search for bookmarks directly, and set the prefix w to search for bookmarks.

  • Open Bookmarks sets the Bookmarks in the search results and opens from that browser. You can choose the default system’s browser or the browser from which the bookmark is being opened.

Take the example of searching for Apple in Safari bookmarks:

You may not be able to find bookmarks after upgrading to macOS 10.15, because the new version of macOS restricts software access to which directory you need to access. So if you want Alfred to be able to search for bookmarks, you need to check Alfred 4.app in security and Privacy > Privacy > Full disk access in your system preferences. Then enter Reload Alfred Cache in Alfred, and Alfred reloads the Cache to search for bookmarks. If you do not give permission, you will not be able to use bookmark search under macOS 10.15.

Clipboard History

By default, The clipboard history function is not enabled for Alfred. You need to manually enable it. You can open the clipboard function for text, pictures, and file lists, customize a shortcut key, place the cursor where you want to paste, call out the clipboard history, select the content you want to paste, and press Enter.

Above is an example of the official website. You can see the cut-out history feature, which shows the application from which the text was copied, the time, the size and size of the image, etc. ⌥ + ⌘ + C (Alt + commaand + C) open the Clipping history view:

This is very useful for a large number of copy and paste functions, so you can experience it yourself. Here is the configuration content:

  • Clipboard History you can set the retention time of normal text, pictures, and files. Alfred will save a copy of the content copied here. Therefore, you need to set the expiration time to prevent the software from occupying too much space.

  • Viewer Hotkey Is used to set the global shortcut key that can be called across all software interfaces to insert cut content. I normally set it to ⌥ + ⌘ + C (Alt + commaand + C).

  • Viewer Keyword is used to enable quick access to clipboard history view by entering CL into Alfred’s input box. The default is clipboard Keyword. In addition, after entering the clipboard history view, press Alfred’s global hotkey to return to the input box.

  • Not only does the Clear Keyword version of the content take up space, you may also include sensitive content, so you may want to Clear the cut Keyword version of the content. So, you can click Clear Now on the right to Clear it immediately (note that this execution does not confirm the popover. The data of the clipped version cannot be recovered after clearing. “Or open The Alfred input box and type clear. You can choose to clear the latest 5 minutes, 15 minutes or all data. You can do this by yourself.

  • The feature Snippets is described in the next section and it is recommended to check them all. Now that’s in the next video.

  • Universal ignores clipped versions of content synced from other Apple Settings. You are advised to deselect it. The cut-out feature for synchronizing the same Apple account started with macOS 10.13 and iOS 12, Use the Universal Clipboard to copy and paste between Apple devices – Apple support, use the Universal Clipboard on iPhone – Apple support, Copy from Mac and Paste between devices – Apple support.

  • For example, if you copied three pieces of text, you might want to merge them into a single paragraph. By default, you need to press the shortcut 3 times, but if you check the outer-merging function, you can quickly merge the contents of a cut paragraph. To activate the merge operation, click the Fast Append Selected text TAB to merge + C. The default is to combine + C and press the C key again. The content of this cut will be merged with the content of the last cut. The format of the merged content can be whitespace, newline, or unseparated to separate the merged text.

  • You can set some Advanced content here. For example, press Enter in the cut-out history view and paste it into the input box of the currently active application. If the copied content is the same content automatically moved to the first (not repeated save); The maximum size of the content of the cut version, 256K string, 512K or unlimited, etc. Ignore Apps, you can ignore Keychain Access, 1Password, Wallet and other potentially sensitive clip-content, etc.

Snippets (characters)

The purpose of snippets is simply to insert custom text behind the current cursor by means of keywords or shortcuts.

Official examples:

Snippets are for creating and sharing Snippets of text that is often typed, for example when you need to type a phone number, A URL, an Email, etc. It would be a waste of time to type more than 6 characters every time.

The operation of the official example GIF will be automatically replaced with a corresponding text emoji package when you input TFLIP1! Do you feel very strong! Very efficient! To use it, select Automatically Expand snippets by keyword in the configuration and select Security and Privacy > Privacy > Accessibility in The system preferences and select Alfred 4.app.

  • Viewer Hotkey We don’t want to set a separate shortcut here, because it shares a popover with the Clipboard History from the previous section, which is more efficient. You need to check in the Snippets of Clipboard History to share the interface.

  • When you type snIP in the Alfred input box, you can quickly go to the clipped version history view. The default is snIP Keyword. You can change the word you like, such as SN.

  • Matching sets how snippets are matched, either by Name and Keyword or by inclusion of snippets.

For example, if I want to store all my blog images in a GitHub repository, for example, the download path of an image is: https://github.com/iHTCboy/iGallery/raw/master/BlogImages/ / month/year XXXX. PNG. So if I need to insert this image while writing a blog post, convert it to markDown:! [XXXX. PNG] (https://github.com/iHTCboy/iGallery/raw/master/BlogImages/ / month/year XXXX. PNG), if every time I was written by hand, you say it’s not very pain! Pain! Pain! Because there is no technology. So, I define shortcuts like this:

Use the keyword gimg to enter the format quickly! [] {the clipboard} {clipboard} (https://github.com/iHTCboy/iGallery/raw/master/BlogImages/2020/02/), which {clipboard} is the contents of the current shear edition. Look at the result, and you can see how efficient it is:

In this case, I just need to copy the name of the image (⌘ + A to quickly rename the file name and ⌘ + C to copy the file name). Of course, the Workflows below will allow you to quickly copy the file name. Alt + ⌘ + C to quickly open the clip-up history view and type the shortcut keyword (Gimg). Then the Enter key completes the markDown format image generation. Of course, the last two steps can be combined into one step. When configuring Snippets above, check Auto Expansion Allowed so that typing Gima directly where you need it will show the replacement, eliminating one more step. Do you feel faster than remembering snippets every time

In addition, Alfred provides a number of placeholders that will be automatically changed during substitution, such as {time} (e.g. 16:26:23), {date} (e.g. February 9, 2020), {clipboard} (the current clipboard), {random} (note: {random:.. } represents a random number, and for other representations, see {} in the lower left corner of the editing window. For more powerful replacement operations, Alfred suggests using the Workflow Snippet Trigger Object.

If you have some emojis, you can use the macOS shortcut CTRL + Command + space to go to the emojis screen and select the Emoji you want, but this is a cumbersome search process, there are hundreds of emojis, so you can use snippets to quickly type:

Above, Emoji form can be downloaded by imported into your Alfred, download address: macOSConfig/Alfred/Snippets iHTCboy/macOSConfig.

For more Snippet groups, check out the website recommended Snippets – Alfred:

  • Mac Symbols: a collection of commonly used Mac symbols, such as input!!!!! cmdThe correspondingSymbol, “!!!!! Shift to the “registering” and so on. With this collection, you no longer have to wade through the symbol table to find a Mac glypher.
  • ASCII Art: a collection of fun Martian emojis, such asAdded: ak47 schematic item and loot.
  • Currency Symbols: A collection of commonly used Currency Symbols, such as “::cny” for “¥”,” :: USD “for” $”, etc.
  • Dynamic Content examples: Examples of Dynamic Content examples.
  • Emoji Pack: A powerful Emoji Pack. There are a large number of emojis, and typing the corresponding keywords can automatically insert the desired Emoji, which is not too convenient, no longer need to turn pages to find.
Suggestions for Snippet keywords

Once the Snippet items are defined, type group Affix + item Keyword + group Keyword wherever the text is entered, and the corresponding text Snippet will automatically expand. The Affix + Keyword combination, however, should be defined according to rules that are easy to remember, easy to type, and not conflict with other hotkeys. Here are some tips on how to define Affix and Keyword:

  1. Don’t use normal words in the Keyword to avoid some unexpected expansions. For example, if you define the Keyword asapple, in any inputappleWill be extended to a defined text fragment, even if what you want to type isappleThe word itself. Therefore, it is best to use some special notation, such as the keyword of the first letter of each word picked up together and so on;
  2. All snippets start with a non-alphanumeric number, such as an exclamation point (!). A semicolon (;) , colon (:), etc!!!!! office.::coffeeSuch);
  3. Use less commonly capitalized forms, such asofficE;
  4. Use double letters, for examplettime.
How it works, for a Dynamic placeholder

A lot of times, you want to insert specific content into the text, but the content will be different each time you type it. For example, {time} (e.g. 16:26:23), {date} (e.g. February 9, 2020), {clipboard} (the current clipboard), {random} (note: {random:.. } represents a random number, and for other representations, see {} in the lower left corner of the editing window. And so on.

Display datetime There are three placeholder keywords for displaying datetime:

  • {date}: Displays the current date
  • {time}: Displays the current time
  • {datetime}: Displays the current date and time

Dates and times can be displayed in short, medium, long, or full, but Alfred defaults to midium. To change the display style, simply follow the keyword with the corresponding style name, such as {date:long}. The specific format of these displays can be viewed in the preferences Settings -> Time & area of the system.

Not only can display the current time, but also can use the addition and subtracting arithmetic symbols to calculate, to display the past or future date and time, such as {date +1D} will show tomorrow’s date, {time-3h-30m} will show three and a half hours ago, and so on. The following operators are supported:

  • Y: 1 year
  • M: 1 month
  • D: 1 a day
  • H: 1 hour
  • M: 1 minutes
  • S: 1 SEC

When using the formula to calculate the time, it can also be connected to the display mode, according to the required format to display the corresponding date and time, such as {time-2h-20m :long}, {date-2m :short}.

Clipboard content uses the displacement function of {clipboard} to select different sequences of clipboard text. It should be noted that the displacement here starts from the number 0, not 1. {clipboard:0} represents the first item of clipboard content, {clipboard:1} is the second item of clipboard content. {clipboard:2} is the third, and so on. {clipboard} has the same meaning as {clipboard:0}.

You can also add some conversion commands to convert the text in the clipboard:

  • {clipboard:uppercase}: Converts all text to uppercase;
  • {clipboard:lowercase}: Converts all text to lowercase;
  • {clipboard:capitals}Capitalize the first letter of each word in the text.
    • {clipboard:trim}: Deletes white space characters, such as newlines and Spaces, before and after the text.

Cursor position The {cursor} placeholder allows the cursor to automatically position the {cursor} in the text after the Snippet is extended to the corresponding text to facilitate later input of some content.

Random value Random value placeholder {random}, including:

  • Random universal unique identifier UUID:{random:UUID}Like 5 faf0ac6 – B410-446 – c – A311 – E41074205A05
  • Random numbers:{random:1.. 10}
  • Random items in the list:{random: apple, banana, pear, grape, orange}

Modifier (modifier) version 4.0 introduced the form such as {placeholder: variation. The modifier} placeholder syntax, can be divided into three parts: Placeholder category, variation (which can be understood as a parameter or subcategory), modifier. Generates a placeholder for random numbers between 1 and 10 {random:1.. } placeholder (placeholder); The 10 parts are variation, while the modifier part can be selected from these:

  • trim: Delete the whitespace characters such as newline and space before and after the content.
  • reverse: Text inversion.
  • stripdiacritics: Remove accent marks, such as “A” to “A”.
  • stripnonalphanumeric: Removes non-alphanumeric characters such as punctuation marks and emojis.
  • uppercase,lowercase,capitalcase: Uppercase, lowercase, and first letter uppercase conversion.

These modifiers can also be used for clipboard placeholders and variables within Workflow, such as {clipboard:3.reverse} to reverse the contents of the third clipboard history; {var: result. Trim. Uppercase} represent of the content of the result variable, delete the blank characters before and after, and then converted to uppercase. As you can see, modifiers are partially supported for composite combinations.

Rich Text

Version 4.0 adds rich text support, which is useful for everyday tasks such as writing emails, and further expands the usage scenarios. Additional edit menu with simple adjustment options for font, bold/italic/underline, color, copy/paste format, etc. In addition, it can automatically recognize the link text in the copy. If that doesn’t work, you can edit and paste it in the Text Edit app. Rich text is marked with ✴️️ in the list of snippets.

There are a lot of tricks to use for Snippets, but here are two to help you define the Snippets you need!

Calculator = Calculator = Calculator

  • Standard Alfred also supports calculator computations. You can simply enter 16 * 1024 to calculate the result, which is automatically saved to the clipboard after hitting the Enter key, making it easy to copy and use. It is also possible to continuously input 16 * 1024/256, and the more complex (1 + 4) * 6 / (7 +3).

  • Using the GCMathParser module, Alfred can also perform many more Advanced calculations, such as trigonometry, square roots, and so on. If this option is selected, the expression starts with =, for example: =log2(256) + SQRT (1024/2*3^4). The advanced calculations supported by Alfred have the following formulas: sin, cos, tan, log, log2, ln, exp, abs, sqrt, asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh, ceil, floor, Round, Trunc, Rint, near, DTOR, RTOD, etc.

  • Input/Output Sets the fractional separation of Input and Output result expressions.

It is very considerate that when you use Excel and other software to do financial calculations, the numbers often come with currency symbols, such as ¥, $, €, etc. When you copy the signed numbers from Excel into the input field, Alfred automatically omits the currency symbols, so you can do the calculations directly without having to edit them in the input field.

A Dictionary is a Dictionary.

Alfred comes with a built-in dictionary lookup and uses Apple’s built-in dictionary software, which can be evoked by the keywords define and spell. I’m going to change define to DF for faster! It is worth mentioning that spell can help you to blur the spelling, sometimes forget how to spell the word, can use it.

Apple’s default dictionary is small. You can download more extended dictionaries here: macOSConfig/macOS_Dictionary · iHTCboy/macOSConfig

To search apple example:

Contacts (Contacts)

Alfred also has built-in Contacts, which allows you to view business cards and Copy information by typing in the names of your friends in Apple’s address book. Here because we are programmers, so we rarely use business cards, so I won’t explain too much here.

Music (Music)

You can control iTunes from the keyboard with Alfred’s built-in mini player, search your iTunes music collection, play albums by genre or style, and more. People here like to use their Music App, and most people don’t buy Apple Music, so I don’t want to talk about it, but if you need it, you can use it.

Sample website:

1Password

Search and open bookmarks in your 1Password directly from Alfred.

But I don’t use 1Password anymore, because iCloud’s Passwords & Accounts are already great! There’s no need to record or search for passwords anymore, and of course, iCloud now has inadequate access to passwords and accounts, no separate access and management passwords, and uses a macOS or iPhone device password, so it’s all over if the password gets leaked.

System (s)

Alfred supports system function operations, such as: Screen Saver (display standby Screen), Empty Trash (Empty recycle bin), Log Out (Log Out of current user), Sleep (Sleep mode), Sleep Displays (close Screen display), Lock (Lock Screen), Restart (Restart Screen), Shut Down, Volume Up, Volume Down, Toggle Mute and other shortcut commands.

For applications, you can use the following methods: Hide, Quit, Force Quit, and Quit All.

Eject ejects a disk, memory card, or virtual disk image, such as a.dmg mounted disk. Eject All: Eject All.

Keywords can be customized for the above operations. In addition, some operations followed by Confirm indicate dangerous operations. You can select them to prompt the operation risk first.

Lock the screen and leave the office for a meeting! If you’re going to the bathroom, you can use Sleep Displays to temporarily shut down the screen. Empty Empty the recycle bin.

The Terminal

Run commands and scripts in the terminal from Alfred, and run shell and terminal commands. You can set > or other prefixes to indicate that the command is being executed. The default is to open macOS terminal software, or you can change it to open iTerm. Check out my previous article about using the iTerm software and shortcuts.

Changing the way the command is opened from iTerm is as simple as selecting Custom in Application and entering the following Apple script code in the text box below:

on alfred_script(q)  
    if application "iTerm2" is running or application "iTerm" is running then  
        run script " on run {q} tell application \":Applications:iTerm.app\" activate try select first window set onlywindow to false on error create window with default profile select first window set onlywindow to true end try tell current session of the first window if onlywindow is false then tell split vertically with default profile write text q end tell end if end tell end tell end run " with parameters {q}  
    else  
        run script " on run {q} tell application \":Applications:iTerm.app\" activate try select first window on error create window with default profile select first window end try tell the first window tell current session to write text q end tell end tell  end run " with parameters {q}  
    end if  
end alfred_script
Copy the code

Large Type (magnifier style)

Some execution result text might be convenient for others? Need to show the effect of amplification, here is not much to say, the feeling can be used by everyone is not much. For example, the result of executing 2^10 can be displayed by pressing comd + L:

Previews

If you’re familiar with macOS, macOS has a handy feature called Quick Look, which is to select a file in the Finder and press the Space key to get a Quick preview of the file without opening the application. Such as PDFS, images, videos, audio files, and so on. Alfred also integrates this function, but instead of registering Spaces, the shortcut is to the shift key. Select the file you want to preview from Alfred’s list of search results and press the Shift key to preview with a Quick Look. If you do not want to preview files or files In certain paths, you can set No Previews For and No Previews In.

Workflows (Workflow)

Workflows translates to workflow in Chinese and should also be easy to understand. Part of the functionality described on the web is workflow, which can be understood as Alfred’s own workflow. Similarly, can you think of any operational processes that can be customized? So, of course, you can also use third-party workflows, or define your own workflow!

If you want to use third-party or custom workflows, you need to pay for Alfred’s PowerPack, which is one of the best services to buy. Because if you use Alfred without PowerPack authorization, the power of Alfred is missing both arms. The details of PowerPack are covered in the next section, but let’s move on to Workflows.

When Alfred installs the Powerpack, it is like installing the engine on the car body. The rest is up to us to DIY and make the engine provide us with unlimited power. The engine is powered by a fuel we call Workflow. The official description of Workflow is:

With Alfred’s Powerpack and workflows, you can extend Alfred and get things done in your own way. Replace repetitive tasks with workflows, and boost your productivity. Discover the abundance of workflows that integrate with your favourite Mac applications and web services, from social networks and note-taking apps to shopping and music services. We’ve hand-picked a few of the best workflows here. You’ll find hundreds more on Packal, a brilliant user-created repository for workflows, as well as on Alfred Forum, where you’ll also find help in creating your own workflows. With Alfred’s Powerpack and workflow, you can extend Alfred and do things your own way. Replace repetitive tasks with workflows and increase productivity. Discover rich workflows that integrate with your favorite Mac applications and Web services, from social networking and note-taking applications to shopping and music services. We’ve hand-picked some of the best workflows here. More information is available at Packal, an excellent site for user-created and uploaded workflows, and at the Alfred Forum, where you can find help with creating your own workFlows.

Understand the Workflows structure

Implement the four basic objects of WorkFlows: trigger, keyword, Action, and Output. By properly “connecting” these four basic objects, Alfred is able to achieve various advanced functions. Alfred’s Workflow configuration interface, on the other hand, divides it into three columns, with triggers and keywords both triggering subsequent actions and falling into the “cause” category. Action is the “process” class, also the core of workflow, it is responsible for handling user needs; Output is the “result” class, which is responsible for passing the result of the action to the user in some form, either directly on screen, saved as a file, or returned to the input box of the last program. In short, these three categories of “four objects” each do its own job, can finally complete more complex data processing and user needs. These four objects can be linked with lines to form direct or indirect conditional outcome relationships.

The main purpose of this article is to improve efficiency, so we will not explain how to customize Workflows for the time being. Later, we need to add more Workflows. The reason is that Workflow creation threshold is relatively low, similar to iOS Workflows, and Workflow supports a lot of programming languages. You can refer to existing Workflows to see how they are built and processed. Also, refer to my Workflows: Using Alfred Workflow for quick chat referrals to create your own Workflows!

Here’s a list of some efficient Workflows plugins I’m using now. There are too many to cover all of them, but you can see all of the Alfred plugins I’m using here: macOSConfig/ Alfret-ihtcboy

Recommended for efficient Workflows

  • Recently used files/applications, etcRecently opened documents:

Recently opened apps:

Tutorial: Use Alfred to make your most Recent files available for download: MPco/AlfredWorkflow-recent Documents

  • Finder path quickly open the switch to the terminal (iTerm) the path of the download: TerminalFinder | Packal

  • Quickly copy the current folder path or file name. Source: HZLZH/Alfred. Workflows. The following download link is modified by the blogger to add the file name copy and use the latest Finder icon. The file path or filename (CPN) of the file (cp) selected by the current Finder is quickly copied. Alfred at Master · iHTCboy/macOSConfig

  • Xcode developers clean up DerivedData

    Download:ChopinChao/xcdd_workflow: a simple xcdd workflow for Alfred2

  • Global open App (customizable shortcuts) tutorial: good workflow recommended GitBook download: my – workflow/AppLauncher alfredworkflow bestswifter/my – workflow

  • Linux Command download: jaywcjlove/linux-command: Linux Command search tool, which contains Linux Command manual, detailed explanation, learning, and collection. https://git.io/linux

  • Encode/Decode Download: Willfarrell/Alfred. Encode – Workflow: Encoding and decoding a sting into multiple variations.

  • Quickly adjust the picture size download: Resize the Image | Packal

  • Use WorkFlows to compress images quickly with TinyPNG alfred-gallery/image Compressor.alfredworkflow – BlackwinMin/alfred-gallery

  • The color value tools download: Colors | Packal

  • Fast in the Finder window to create a new file download: NewFile | Packal

  • Chrome History and Chrome Bookmarks can be used to search for Chrome’s favorite Bookmarks and History (fuzzy search is supported). Tupton/Alfred – Chrome-history: Search your Google Chrome history in Alfred

  • Download from the Google browser to open the URL: Alfred Chrome | Packal

  • Kaiye/workflows-Youdao: Learn English and write tools

  • Xfslove/Alfred – Google -translate: Alfred 3 Workflow-translate with Google API 💵🚫

  • Alfred Workflow for quick quotes and replies MacOSConfig /Reply Message v1.0.AlfredWorkflow at master · iHTCboy/macOSConfig

  • Evernote supports global search of Evernote. This is a nice and powerful feature that helps you quickly navigate to specific evernote entries. Download: Evernote Workflow 9 Beta 4 (Alfred 4) – Share your Workflows – Alfred App Community Forum

  • Currency conversion download: Currency Exchange | Packal

  • Quick global search of Dash code Doc documents. Dash: Quicker API Documentation Browsing – Alfred Blog

  • The world’s major cities time zone query download: TimeZones | Packal

There are many more workflows that can be customized to suit your needs. In addition, there are many not recommended, refer to the WorkFlows link encyclopedia at the end of this article.

More Workflows resources

  • Workflows The Workflows series recommended by the official site.

  • Workflows sharing site recommended by Packal.

  • Workflows Many Workflows collected by Chinese people.

  • zenorocha/alfred-workflows: A collection of Alfred 3 and 4 workflows that will Rock Your World Summarized workFlows for development.

  • The Alfred forum is dominated by individual developers who develop plug-ins to solve specific problems.

Appearance

Alfred’s default style is a white background, which is not very attractive, but there are several styles to choose from. In addition, you can also customize the appearance. For example, the blogger’s theme in the picture above has a transparent glass background, white input text, blue select text, white gray default text, and light yellow shortcut text. For those who like to do DIY, you can change the style of the Alfred interactive panel by clicking + in the Appearance panel. Alternatively, you can download someone else’s look and feel, such as at Packal.

Download this blog Theme appearance link: iHTCboy-Theme. Alfredappearance

Remote

You can also use the mobile version of Alfred to control the desktop. Download the Alfred Remote on the App Store for iOS.

The latest version 1.1 of Alfred Remote for iOS was released on September 1, 2015 and costs 30 RMB. It hasn’t been updated for 5 years now, so I don’t expect it to bring much efficiency, so I suggest you don’t download it for the time being. If you need to learn more, check out the tutorial in this article: OS X Efficiency Launcher Alfred’s Best Companion: A Primer on Alfred Remote for iOS – Minority.

Advanced (Advanced)

  • Advanced configuration functions such as Clear Application Cache and Rebuild macOS Metadata are required in the Files/Apps configuration.

  • Force Keyboard is the default input method on Alfred’s input field.

  • History

  • Action Modifiler Shortcut key to the right of the search result. The default is CMD + a number (CMD is the Apple key ⌘). This can be changed to a ^ + number (^ is the CTRL key).

There are also default action shortcuts. For example, after Alfred enters swift, the following three shortcuts are available:

  • CTRL + ↩ ︎: Search in the browser’s default search engineswiftKeywords.
  • Alt + ↩ ︎Open:Finder(access) of the search box queryswift.
  • CMD + ↩ ︎: Opens the directory where Alfred’s search results are located (if they are local files).

The above shortcut keys can change the Action (Action) which cannot be changed, you can adjust.

  • Learning

  • Notifications

  • Network

  • Selection Hotkeys

  • Syncing sets up all of Alfred’s configuration content, including the Workflows workflow and Appearance topic, to be backed up and synchronized. The authors suggest using Dropbox for syncing, but for reasons you can understand, I suggest using iCloud Drive for better! To Set this up, go to the Set Preference Folder pop-up and go to the iCloud Drive directory under the iCloud category. Create a new folder in the directory Alfred to hold all of Alfred’s configuration synchronization files (Alfred. Alfredpreferences), so that if you have multiple macOS, You can log in to the same Apple ID and sync seamlessly across all your devices. You don’t need to follow everything. Click On Alfred’s Reveal in Finder to open the directory where you set the synchronization files to be.

Of course, Alfred’s Usage isn’t currently shared on each macOS, and if you don’t have enough hard disk space (less than 20GB), the iCloud Drive’s contents are often cleared on your local system. You’ll need to download Alfred’s synchronization files (Alfred. Alfredpreferences) on the remote end.

Powerpack

Workflows extensions, file navigation, clipboard history, address book, iTunes Mini player, and more are required to purchase this Powerpack upgrade package, otherwise Workflows will not be available in the free trial. The blogger personally recommends that those who can afford to buy a legitimate license code because of the value of the software, which was mentioned in the first article in this series.

Currently, only VISA, Mastercard, AMEX, or Paypal are supported. So for the Chinese area is still not very friendly! The current single license code for version V4 2020 is £25, which is about ¥225.26. Super-supporters can pay £45 and get a free upgrade for life. Note that this is a single user, meaning that one activation code can only be used on one macOS. The specific purchase process is omitted here, conditional students suggest to choose to buy on demand.

Alfred Powerpack – Take Control of Your Mac and macOS

Usage:

Alfred will count usage. As you can see above, the line chart shows the use of 28 days (of course, there is a trough zone because of the Spring Festival holiday when writing this article). Since September 2, 2019, they have used Alfred 6,321 times, an average of 39 times a day. You can also see that Clipboard and Hotkeys are used most frequently. To illustrate Alfred’s potential value, let’s do a simple calculation and assume that I can maintain my current status every day based on an average of 39 wake-up calls per day. If every time the operation of the Alfred, can save 5 s time for me (often some complex operations will be more than 5 s, such as to find a hidden deep in the file, or a file, or can’t remember all not a commonly used software, or open a commonly used bookmarks, etc.), then 1 year down, could save 0.82 days.

39 * 5 * 365/366/24 = 0.823784722 days

In other words, Alfred added 0.82 days to your life! If it’s five years, it’s four days! This is a base 39. As you can see from the tutorial above, a complex operation can save a few minutes, and a lot more if repeated a hundred times, so the time savings are significant! In short, people often have a lot of repetitive workflows or steps, which is much more impressive, so use it now!

Help sb. with STH.

Searching the Preferences is very useful, because Alfred has a lot of profiles, so if you don’t want to click through, Searching is always the fastest. Search Alfred in Alfred, the author is still very careful! Also used in the Alfred input box? Keywords can also search For Alfred’s preferences.

The other is the help and feedback page, which will jump to the web page and not expand here.

Update (Update)

This update page is also important to let us know exactly what changes or new features have been made in the latest version. I have found that many applications do not do ChangeLog well, at least the software does not do enough care, users do not care about how awesome you are, you use their own experience, updating documentation is a very important part of software development. I won’t go into detail here, sometimes in other articles together.

Summary of other questions

Here’s a summary of some of the problems you might encounter with Alfred, which will be updated in the future. When you install or start for the first time, this permission popup will be displayed by default:

Stating that permissions are the most important and fundamental requirements for Alfred, let’s take a look at what system permissions are necessary.

The macOS system permission is incorrect

After macOS 10.15, Apple reduced software access to various systems, such as hard drives, folders, screen recording, input monitoring, automation, and more. Let’s talk more about the effect on Alfred:

  • Auxiliary function: Allows apps to control your computer.

When used to control the computer in Alfred if you do not have permissions:

  • Input monitoring: Allow the following App to monitor input from the keyboard, even if you are using another App. The application in Alfred is all about keyboards, all about keyboards, heavily dependent on Snippets, and Workflows are also used to listen to the keyboard.

  • Full disk access: Allows the App to access data such as Mail, messages, Safari, Home, time machine backups, and partial administrative Settings for all users on this Mac. In Alfred, much of the data is dependent on the system’s disk directories.

  • Files and folders: Allows apps to access files and folders

Directory permissions are required in Alfred if you want to open or jump to a directory. Note that, of course, when the above full disk access is checked, this becomes the default check, become inoperable state, this is very understandable. If you first install Alfred, you will be prompted to access folder permissions of the type you used to access the desktop:

  • automation: Allows an App to control other apps. This will allow the App to access the documents and data in these controlled apps and perform operations within them.

The thing that Alfred uses the most is to access the Finder App.

In summary, what we want to do is talk about the permissions on the system and the permissions that Alfred uses, so that you have a better understanding of these permissions so that you can decide which sensitive or data can be turned off or on with these Settings, striking a balance between efficiency and privacy.

No results for bookmarks

If you’ve just upgraded to macOS 10.15, you may have a problem finding bookmarks in your browser that don’t appear. This is due to system permissions, and you need to check Alfred 4.app in the System preferences setting security and Privacy -> Privacy -> Full disk access. Then enter Reload Alfred Cache in Alfred, and Alfred reloads the Cache to search for bookmarks. If you do not give permission, you will not be able to use bookmark search under macOS 10.15.

conclusion

So we’ve covered all the features of Alfred! Does everyone have a comprehensive understanding! Based on the latest Version of Alfred V4.0! I did not think that the flag set two years ago would be completed two years later, so I hope this article can be correct and efficient in two years to guide you! This is another 10,000-word article, which may not be enough for everyone to read, but I hope you did! Alfred is a must-have productivity tool for macOS programmers! Hope it’s not too late for you to read this article! You can use Alfred to improve your daily life and productivity.

Due to the limitation of length, some of the content can be expanded and in-depth read the following reference article. If you haven’t used it before, you should start using Alfred! I hope you all start your own Alfred journey! Improve their daily work and life efficiency, save time and effort, so that the efficiency of programmers used!

reference

  • Alfred – Productivity App for macOS

  • Packal – Alfred Workflows and Themes

  • Alfred Forum

  • Mac Dictionary tool recommended: Youdao Alfred Workflow (synchronous word book) – Maoge_kaiye – blog garden

  • Chat with Alfred Workflow implementation content quick reference reply | iHTCboy ‘s blog

  • Mac OS Essential tool: Alfred – dawn blog

  • Alfred efficiency artifact raiders

  • Alfred is the best companion for OS X efficiency launcher: Alfred Remote for iOS

  • Copy and paste between Apple devices using the universal Clipboard – Apple support

  • Use universal Clipboard on iPhone – Apple support

  • Copy from Mac and paste between devices – Apple support

  • Stidio /Alfred-Workflow: Alfred Workflow tutorial and examples; CDto: Open Terminal and go to any folder or directory where the file is located; Effective IP: Queries the LOCAL COMPUTER and Internet IP addresses, resolves the IP address of any URL or domain name, and queries the home place and carrier. UpdateAllNPM: Update all node.js global modules; UpdateAllPIP: Updates all Python modules

  • Play with the Mac Alfred – LifePro

  • Alfred · Mac Efficient Practical Guide · Look at the cloud

  • How does Alfred, the search tool you always find on Mac essentials, work? | newbie question mark – the minority

  • All in order to make efficiency a step further, Alfred 4.0 update details – minority

  • Alfred Workflow from Use to creation – Minority

  • To really improve your input efficiency, start with this feature of Alfred: Snippets – Minority

  • Alfred puts your most recent files within easy reach. – Minority

  • A seemingly complicated DEVONthink search can be easily handled with Alfred Workflow – minority

  • Write a Alfred Workflow from 0 to 1 – Minority

  • The problem and solution encountered in Writing a Alfred Workflow from 0 to 1 – Minority

  • Alfred for Windows, the free and open source Productivity Starter: Wox – Minority

  • Learn Alfred from scratch: Basic Features and Settings – Minority

  • Reinventing the file management and search system with AppleScript, Tags, and Alfred – Minority

  • Achieve Alfred’s Search experience with Ai Search and Drafts – Minority

  • 5 Alfred extensions to improve document processing efficiency – Minority

  • Alfred, if I call you efficiency on the Mac, will you say yes? What is worth buying

  • Mac Efficiency artifact Alfred and common Workflow – a simple book

  • Alfred is a series of tutorials for Snippets

  • Greatly improve operation efficiency with Alfred – Workflow – Zhihu

  • Alfred series tutorial – Clipboard history – Zhihu

  • Workflows to recommend

  • zenorocha/alfred-workflows: A collection of Alfred 3 and 4 workflows that will rock your world

  • Whyliam/whyliam. Workflows. Youdao: use youdao translation of words and sentences you want to know

  • Kaiye/workflows-Youdao: Learn English and write tool

  • Share your Workflows – Alfred App Community Forum

  • Jaywcjlove /linux-command: search for Linux commands, including Linux command manual, detailed explanation, learning, and collection. https://git.io/linux

  • The Alfred Workflow – I’m Company for efficiency

  • hzlzh/Alfred-Workflows: Make your Alfred more powerful. (include Workflows, Extensions and Themes)

  • willfarrell/alfred-workflows: Alfred Workflows for Developers

  • hzlzh/AlfredWorkflow.com: A public Collection of Alfred Workflows.


  • If there is infringement, contact will be deleted!
  • If there is an incorrect place, welcome to guide!
  • If you have any questions, please join us in the comments!


Note: This article was originally published on iHTCboy’s blog, if reproduced, please note the source