OS X Yosemite Spotlight extensions
Asked Answered
M

3

11

Is it possible to extend spotlight's search feature to support additional commands?

For example, is it possible to define custom web search aliases, meaning I could type yt and it would provide results from youtube.

Alternatively, is it possible to add additional system commands were I could type sl (or some variant) to put my computer to sleep.

Maryrosemarys answered 5/8, 2014 at 3:3 Comment(0)
G
8

No it is not possible, there are only 4 types of extensions for OS X Yosemite:

Today - Get a quick update or perform a quick task in the Today view of Notification Center
Share - Post to a sharing website or share content with others
Action - Manipulate or view content within the context of another app
Finder - Present information about file sync states directly in Finder.

All of these extension types are explicitly activated by the user for functionality. Apple has said that they are just getting started with extensions and plan to add more in the future, so logically it seems that Spotlight extensions are next (goodbye Alfred :sadface:).

Gur answered 22/8, 2014 at 23:20 Comment(1)
This is outdated by now, see me answer below.Bight
B
11

In the meantime there is Flashlight (The missing plugin system for Spotlight) http://flashlight.nateparrott.com/

This is expandable with Python scripts.

UPDATE Oct 2016 It seems that Flashlight is not longer maintained. The last update was more then a year ago. Check the repo here: https://github.com/nate-parrott/Flashlight

UPDATE Mar 2017 There is a fork which is still maintained: github.com/w0lfschild/Flashlight – Thanks @amoebe

Bight answered 28/11, 2014 at 16:23 Comment(4)
This is also outdated. OSX does not allow Flashlight to work after El Capitan update.Oxytetracycline
That is also kinda outdated. You can run it again, provided you are willing to turn off system integrity protection for install time (and then turn it on again)Unmerciful
This is outdated.Bunker
There is a fork which is still maintained: github.com/w0lfschild/FlashlightExtortionate
G
8

No it is not possible, there are only 4 types of extensions for OS X Yosemite:

Today - Get a quick update or perform a quick task in the Today view of Notification Center
Share - Post to a sharing website or share content with others
Action - Manipulate or view content within the context of another app
Finder - Present information about file sync states directly in Finder.

All of these extension types are explicitly activated by the user for functionality. Apple has said that they are just getting started with extensions and plan to add more in the future, so logically it seems that Spotlight extensions are next (goodbye Alfred :sadface:).

Gur answered 22/8, 2014 at 23:20 Comment(1)
This is outdated by now, see me answer below.Bight
I
4

I have an alternate solution for you which I am currently using. It's native to the OS and does not require disabling System Integrity Protection in order to install Flashlight.

enter image description here

Using Automator to create a new Service. Then with Ask For Text node you can display a popup similar to spotlight. From there the possibility are numerous. For web search there is a command like Display Webpages. The top activate AppleScript command is for gaining focus of the following popup.

You can construct the URL from your input text using JavaScript node. You can parse "yt" to YouTube search url for example and put the rest after the space to the URL.

Then in Preference you can set this new service as a shortcut for easier access.

enter image description here

enter image description here

Ibiza answered 27/10, 2017 at 18:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.