1.1.2 • Published 6 years ago

electron-spotlight v1.1.2

Weekly downloads
26
License
-
Repository
github
Last release
6 years ago

electron-spotlight

Index or remove items in macOS Spotlight, using a native Node module.

Quick-start

npm i electron-spotlight
import { addItems } from 'electron-spotlight';

addItems([{
  id: 'your-unique-identifier',
  title: 'Title In Spotlight',
  icon: 'https://pbs.twimg.com/media/CdlFCYmXIAAGkiH.jpg'
}])

API

addItems(items: Array<SearchItem>)

Index items within Spotlight. Maps to indexSearchableItems.

export interface SearchItem {
  id: string;
  title: string;
  icon?: string;
}

Note that you must be on a signed build to communicate with corespotlightd. Otherwise you'll see Unable to communicate with helper app.

removeItems(ids: Array<string>)

Removes items from Spotlight according to their unique identifier. Maps to deleteSearchableItemsWithIdentifiers.

removeAllItems()

Removes all items from Spotlight indexing. Maps to deleteAllSearchableItemsWithCompletionHandler.

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago