Why Would I Want To Do This?
If you are a user of both the Alfred Launcher application and the Parallels app to run Windows (or other Operating System) Applications, you may find that you accidentally open these applications from Alfred search results. This can be problematic because it causes your whole Parallels Virtual Machine to launch if not already open. After a few times of doing this myself, I set out to find out how to keep those apps from appearing so I wouldn’t accidentally launch them.
Because Alfred uses the same index as Spotlight on your Mac, we can take advantage of a neat feature within Spotlight that allows you to set the privacy settings on a folder so that it doesn’t appear in search results. Here’s how we’ll do it.
These are the types of results we are trying to exclude. In this instance searching for Chrome will show my standard Mac Application as well as the ones that are installed in my Windows Virtual Machine. Let’s get rid of these from our results.
Open Your System Preferences
Use your favorite method to launch your System Preferences Pane. By default it will be in your Dock, or you can access it from your Applications folder. As an Alfred user you can access it directly by searching for Spotlight from within Alfred.
Access Your Spotlight Preference Pane
Click on the Spotlight icon to open up the desired preference pane.
Click On The Privacy Tab
This first screen will allow you to choose specific categories you may wish to exclude but since there is no specific category for Parallels Applications we need to manually add it via the Privacy tag. Go ahead and Click on the Privacy tab.
Add Your Applications (Parallels) Folder To Your Privacy Screen
Parallels installs your Applications in the /user/Applications(Parallels) Folder so this is the folder we want to add. There are 2 ways to add folders to your Privacy tab. You can drag and drop a folder from a Finder window to this screen or you can click the + to open a selection window to choose the desired folder. Any folder listed here will be excludes from Spotlight and Alfred searches.
Open Your Alfred Preferences
Alfred caches or stores the applications it knows about for faster search results so we’re going to force it to rebuild. It will happen eventually but I’m impatient and want to show you the new results. To get to Alfred Preferences you can
- Call them up from within Alfred (Version 2.x) or
- Click on the Preferences cog.
Clear Alfred’s Application Cache
- Move to the Alfred Advanced Tab
- Click on the option to Clear Application Cache
Alfred Version 2.x is shown but should be similar in Version 1. I highly recommend upgrading, Version 2 is awesome.
Enjoy Clean Search Results
Now searching for applicaions will ignore those that are installed under Parallels, like my Windows version of Chrome. Note that this does prevent you from using Alfred from launching those apps when you do have your Virtual Machine running but for me the trade-off of not accidentally launching Windows is worth any minor inconvenience.
This process can be repeated for any folders that you wish to keep hidden from search results, not only from Alfred but from your Spotlight searches as well.