-
Notifications
You must be signed in to change notification settings - Fork 28
Per app search customization
In addition to the workflow user configurations (v2.0 and above) that you can tweak to modify global behaviour, you can control app-level search settings.
There is some manual configuration required, so follow along below.
- First, access the settings menu by typing
ms
into Alfred.
-
This should display three results: an entry to the workflow's settings folder, a sample settings.txt file, and an entry to the cache folder.
-
You can open the sample settings file to have a look at the configuration format in detail, and use it as a general reference.
-
To enable customization, you need to create a new
settings.txt
file in your Settings Folder- To access the settings folder from Alfred, type
ms
and pressRight Arrow
key when on theSettings Folder
result - This should open the Alfred commands screen, and you should be able to open the folder in Finder (Choose Reveal in Finder)
- To access the settings folder from Alfred, type
-
Once you have the settings folder opened, create a new empty text file, and name is
settings.txt
. -
While the sample settings file has details, here is a simple example file that prevents showing menu items from the
History
andBookmark → Favourites
menus:
appFilters {
app: "com.apple.Safari"
ignoreMenuPaths {
path: "History"
}
ignoreMenuPaths {
path: "Bookmarks"
path: "Favourites"
}
}
A line by line explanation of the sample follows.
appFilters {
beginning of any app-specific configuration
app: "com.apple.Safari"
specify the id of the app. You can find the correct id by going to the cache folder via
ms
command in Alfred after you have searched for menus from the app of your choice at least once. For Safari, the id will be com.apple.Safari, and you should find files namedcom.apple.Safari.menus
andcom.apple.Safari.cache
. You can strip the last.menus
or.cache
bits to identify the app id.
ignoreMenuPaths {
path: "History"
}
This specifies you do not want any menu (and sub menu) items from the
History
menu listed in your search
ignoreMenuPaths {
path: "Bookmarks"
path: "Favourites"
}
This specifies you do not want any menu items from
Bookmark → Favourites
menu (but can include any other menu items underBookmark
menu)
}
This last bracket closes off the app specific configuration. In this example, for Safari. To begin another app specific configuration, begin with a new section in a new line at the end of the file. Refer again to the sample settings file.
Once you have created your settings.txt
file and placed it in the settings folder, the workflow will automatically read those settings and your filter your search results as per the app settings configured.
If you have a typo in your settings file, you'll see an error when you search for menu items.
Some illustrative examples below, but you would need to manually verify what is wrong with your settings.txt
file.
usually indicates a typo in the sub-setting field names, or a missing
}
between sections
usually means a missing
}
at the end of the file
usually shown if you have typed
true
for some the toggle fields inside quotes, e.g.showDisabledMenuItems: "true"
instead ofshowDisabledMenuItems: true