2

How do I add a system link to the Applications folder and have it show up in spotlight.

Alternatively how do I add a specific folder to spotlight search priority. Easy to rearrange but I can not add anything.

Spotlight Preferences

A related question but not covering what I am interested in is: Can I make a symlink (to a .app folder) in Applications directory show up in spotlight?

3

A Finder alias (not a symlink) will be added to spotlight, if it's sitting in a visible folder, like Applications.

You can create them programmatically using AppleScript (use osascript to integrate with other shell scripts.)

To create an alias use make alias file to {file to alias} at {destination of alias}.

By default (ie. if destination isn't specified) the alias is created on the current user's Desktop, ie. ~/Desktop.

Here's an example script to create an alias of a file in /Applications

set target_app to POSIX file "/usr/path/to/app"
set alias_dest to POSIX file "/Applications"

tell application "Finder"
  make alias file to target_app at alias_dest
end tell

By the way, osascript accepts input from stdin, so to run an AppleScript in a shell script, using a heredoc will work. It may make it easier for you to setup the target file better:

#!/bin/bash
TARGET=/usr/path/to/app
osascript <<EOS

set target_app to POSIX file "$TARGET"
set alias_dest to POSIX file "/Applications"

tell application "Finder"
  make alias file to target_app at alias_dest
end tell

EOS
  • This should be the accepted answer. Note that you can also just right-click in Finder and pick "Make Alias". – ajh158 Apr 11 '18 at 19:03
2

Unfortunately, it's not possible. Spotlight creates an index of everything (except the folders specified in the 'privacy' tab, seen on your screenshot). There is no way, to the best of my knowledge, to set priorities to specific folders.

However, the spotlight index is updated regularly, and takes into account the results of previous searches. That means that by using regularly spotlight, you will improve it.

Personally, I think spotlight is a bit too restrictive. I use Quicksilver, a free launching, searching, do-it-all app. It's the first thing I install on a mac. Give it a try! You can customize almost everything, and there are simple ways to tweak the results of your searches.

Hope it helps.

  • Thanks I use quicksilver too, but was developing some software and wanted to integrate well with the standard mac interface. Thanks, I am going to wait awhile and then mark this as the answer if nothing else shows up. – Davorak Jun 30 '12 at 16:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .