Crate powerpack[][src]

Expand description

⚡ Supercharge your Alfred workflows by building them in Rust!

Introduction

This crate provides types for developing script filter Alfred workflows in Rust. Additionally, this project includes the powerpack-cli crate which contains a command-line tool to help build and install your workflows.

Types in this crate closely mirror the script filter JSON format. View the official documentation for that here.

Examples

Each row in an Alfred script filter result is represented by an Item. A workflow must output a sequence of items to stdout using the output() function.

use std::iter;

let item = powerpack::Item::new("Example title")
    .subtitle("example subtitle")
    .arg("example");

powerpack::output(iter::once(item))?;

Modules

env

Environment variables in workflows.

Structs

Item

An Alfred script filter item.

ModifierData

The settings for when a modifier key is pressed.

Output

The output of a workflow (i.e. input for the script filter)

Text

The copied or large type text.

Enums

Icon

An icon displayed in the result row.

Kind

The type of item.

ModifierKey

A keyboard modifier.

Functions

output

Shortcut function to output a list of items to stdout.

Type Definitions

String

Alias for a lean clone-on-write string.