Skip to content

jimmystridh/alfred-loopback-control

Repository files navigation

Loopback Control for Alfred

An Alfred workflow (+ CLI tools) to control Rogue Amoeba's Loopback virtual audio devices — because Loopback has no official automation support.

Alfred workflow showing Loopback devices

Features

  • Toggle devices instantly from Alfred with lb
  • Assign hotkeys to toggle specific devices (via Alfred's built-in hotkey triggers)
  • Filter by typing — just start typing the device name
  • Visual status — see which devices are enabled/disabled at a glance
  • CLI tools included for scripting and automation

Installation

Alfred Workflow

  1. Download Loopback-Control.alfredworkflow
  2. Double-click to install
  3. Type lb in Alfred

Setting Up Hotkeys

Want to toggle a device with a keyboard shortcut?

  1. Open Alfred Preferences → Workflows → Loopback Control
  2. Click the + button → Triggers → Hotkey
  3. Set your hotkey (e.g., ⌃⌥M)
  4. Connect it to the "Run Script" action
  5. In the script, put: python3 loopback_toggle.py "Your Device Name"

Now you can toggle any device with a single keystroke.

Usage

Type lb in Alfred to see all your Loopback virtual devices:

Action Result
Enter Toggle device on/off
⌘↵ Cmd+Enter Force enable or disable
Type to filter Filter devices by name

CLI Tools (Bonus)

Two command-line tools are included for scripting:

loopback-ctl (GUI Scripting)

Instant toggling via macOS accessibility. No restart required.

loopback-ctl list                    # List all devices
loopback-ctl toggle "LB Bose"        # Toggle a device
loopback-ctl enable "LB Bose"        # Enable explicitly
loopback-ctl disable "LB Bose"       # Disable explicitly
loopback-ctl status "LB Bose"        # Check status

Requires: Accessibility permissions for your terminal.

loopback-plist (Plist + Restart)

Modifies Loopback's config directly. Works headless, supports batch operations.

loopback-plist list                  # List all devices
loopback-plist toggle "LB Bose"      # Toggle a device
loopback-plist set "A=on" "B=off"    # Batch toggle (single restart)

Note: Restarts Loopback (~0.5s audio interruption).

How It Works

Loopback stores device configs in ~/Library/Application Support/Loopback/Devices.plist. These tools:

  1. Read/modify the enabled flag for each device
  2. Restart Loopback to apply changes

The GUI scripting approach (loopback-ctl) clicks the checkbox directly, avoiding the restart.

Troubleshooting

No devices found?

  • Make sure Loopback is running
  • Check you have virtual devices configured

loopback-ctl not working?

  • Grant Accessibility permissions to your terminal
  • Ensure Loopback window exists (not minimized with no window)

Device name not found?

  • Names must match exactly — use loopback-ctl list to check

License

MIT. Not affiliated with Rogue Amoeba.

About

Unofficial scripting tools for Rogue Amoeba's Loopback - Alfred workflow + CLI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors