DropletLauncherItem

One thing Droppy offers a launcher: a command, a settings page, a droplet, a note, a clipboard entry, a web answer.

struct DropletLauncherItem

Items are value snapshots. The id is stable for as long as the thing it names exists, so a launcher can key favorites, aliases and learned ranking on it; hand it back to perform(itemID:actionID:query:) to run it.

Cases

DropletLauncherItem.Kind.command

case command

Something Droppy does: record, capture, open a surface.

DropletLauncherItem.Kind.setting

case setting

A page or a setting in Droppy's Settings.

DropletLauncherItem.Kind.droplet

case droplet

A droplet, installed or on the Store's shelf.

DropletLauncherItem.Kind.surface

case surface

A droplet's own surface, shown in the launcher.

DropletLauncherItem.Kind.content

case content

Something the user made in Droppy: a note, a task, an OCR result, a recording.

DropletLauncherItem.Kind.clipboard

case clipboard

A Droppy clipboard history entry.

DropletLauncherItem.Kind.shelf

case shelf

A file on Droppy's shelf or in a basket.

DropletLauncherItem.Kind.web

case web

A web search or a web answer.

Initializers

init(id:kind:title:subtitle:section:icon:keywords:relevance:actions:accessoryText:)

init(id: String, kind: Kind, title: String, subtitle: String? = nil, section: String, icon: DropletLauncherIcon, keywords: [String] = [], relevance: Double = 0, actions: [DropletLauncherAction], accessoryText: String? = nil)

init(rawValue:)

init?(rawValue: String)

Properties

accessoryText

let accessoryText: String?

A short label at the row's trailing edge, for example "Droplet".

actions

let actions: [DropletLauncherAction]

What can be done with it. The first action is the primary one.

icon

let icon: DropletLauncherIcon

id

let id: String

keywords

let keywords: [String]

Found by, never shown: other names, and for content the text it matched.

kind

let kind: Kind

primaryAction

var primaryAction: DropletLauncherAction? { get }

The action Return runs.

relevance

let relevance: Double

How well the item answers the query it came back for, as the host scored it; higher is better. Zero for catalog items.

section

let section: String

The section a launcher files it under, for example "Droppy" or "Notes".

subtitle

let subtitle: String?

The second line, when the title alone does not say what it acts on.

title

let title: String