Giter VIP home page Giter VIP logo

flashlight's Introduction

Flashlight

Gitter

The missing Spotlight plugin system

Das fehlende Plugin-System für Spotlight.

Flashlight is an unofficial Spotlight API that allows you to programmatically process queries and add additional results. It's very rough right now, and a horrendous hack, but a fun proof of concept.

Have an idea for a plugin? Suggest it

Installation

Clone and build using Xcode, or download Flashlight.app from releases.

Writing Plugins

Start with the tutorial on writing plugins.

How it works

The Flashlight.app Xcode target is a fork of EasySIMBL (which is designed to allow loading runtime injection of plugins into arbitrary apps) that's been modified to load a single plugin (stored inside its own bundle, rather than an external directory) into the Spotlight process. It should be able to coexist with EasySIMBL if you use it.

The SIMBL plugin that's loaded into Spotlight, SpotlightSIMBL.bundle, patches Spotlight to add a new subclass of SPQuery, the internal class used to fetch results from different sources. It runs a bundled Python script, which uses commanding to parse queries and determine their intents and parameters, then invokes the appropriate plugin's plugin.py script and presents the results using a custom subclass of SPResult.

Since I'm not sure how to subclass classes that aren't available at link time, subclasses of Spotlight internal classes are made at runtime using Mike Ash's instructions and helper code.

The Spotlight plugin is gated to run only on versions 911-916 (Yosemite GM through 10.10.2 seed). If a new version of Spotlight comes out, you can manually edit SpotlightSIMBL/SpotlightSIMBL/Info.plist key SIMBLTargetApplications.MaxBundleVersion, restarts Spotlight, verify everything works, and then submit a pull request.

Credits

Huge thanks to everyone who's contributed translations:

If it's not translated into your native language yet, you should consider helping us localize.

The iOS-style switches in the app (ITSwitch.h/m) are ITSwitch, by Ilija Tovilo.

The code injection system is forked from [Norio Nomura](Norio Nomura)'s EasySIMBL.

The ZipZap library by Glen Low is used internally.

Licensed under the GPL and MIT licenses (see LICENSE).

Helping out

You can help out by writing a plugin you want, taking a look at the Github issues, or sharing the app with friends on Twitter or Facebook.

flashlight's People

Contributors

aladler avatar allenhsu avatar andreaponza avatar chaosoldier avatar extrajordanary avatar hawkfalcon avatar iagolast avatar kennylevinsen avatar lanzafame avatar laurentfough avatar lbrndnr avatar lipe1966 avatar marcbachmann avatar matth96 avatar mmarcon avatar nate-parrott avatar patternoia avatar philiptrauner avatar readingsnail avatar sachinkesiraju avatar sbtseiji avatar sebastiangrans avatar shagohead avatar songchenwen avatar timschuitemaker avatar tiphedor avatar umhan35 avatar xe0n0 avatar xremix avatar ymyzk avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.