🎩 Robust alfred alfred.schembri.me
alfred
README.md

Robust Bluetooth #

Connect and disconnect Bluetooth devices from Alfred.

Built as part of Robust Alfred.

Usage #

Use one of the following keywords:

Keyword What it does
bt List paired devices, connected first; keep typing to filter
btt Turn Bluetooth on or off

The following mappings are available on results:

Key Action
↩ Connect the device, or disconnect it if connected
⌘C Copy the device's address

The icon next to each device will be blue when connected and grey otherwise. Paired devices are listed even when Bluetooth is disabled; selecting one will first turn on Bluetooth.

Installation #

Download the workflow from alfred.schembri.me and open it, or build it yourself (see Development).

If downloading, note that the bundled binary is not notarized, so macOS quarantines downloaded copies and Gatekeeper will block the workflow the first time it runs. Remove the quarantine attribute before opening the file:

xattr -d com.apple.quarantine robust-alfred-bluetooth.alfredworkflow

(Alternatively, approve it after the first block under System Settings → Privacy & Security → Open Anyway).

Permissions #

  • Bluetooth — to list, connect and disconnect devices. Allow Alfred under System Settings → Privacy & Security → Bluetooth; the workflow shows an item pointing there if access is missing.

Development #

Built in Rust with powerpack.

cargo run
cargo test              # includes end-to-end tests against the stubs in tests/stub/
powerpack link          # symlink the workflow into Alfred for local testing
powerpack package       # build target/workflow/robust-alfred-bluetooth.alfredworkflow
swift scripts/generate-icons.swift workflow   # regenerate the committed icons

To exercise the binary outside Alfred:

cargo run -- list

It prints Alfred's script filter JSON to stdout.

Attribution #

The workflow icon is Apple's Bluetooth File Exchange app icon, © Apple Inc., used here solely to represent the system Bluetooth functionality this workflow drives (fair use). The row icons incorporate Apple's SF Symbols and the Bluetooth rune from macOS's BluetoothIcon. None of these are covered by this repository's MIT license.

License #

MIT, except as noted under Attribution.