1password
This directory provides Talon integration for the 1Password password manager. It defines voice commands and actions for both global interactions (such as filling credentials in a browser) and in-app management (such as creating, editing, or deleting entries) across both macOS and Windows.
The integration relies on a classic Talon pattern: declaring abstract actions and application identifiers in Python, overriding those actions with OS-specific keyboard shortcuts, and binding voice commands to those actions in Talon files.
Architectural Overview
The files in this directory work together to deliver a seamless, cross-platform experience:
- Action Declaration: password_manager.py establishes the platform-agnostic application definitions for 1Password (detecting it via bundle identifier on macOS and process names on Windows). It also declares the core user actions, such as
password_fill(),password_show(),password_new(), andpassword_delete(). - Platform Implementation:
- 1password_mac.py implements these actions for macOS, mapping them to native Command-based (
cmd-...) keyboard shortcuts. - 1password_win.py implements them for Windows, mapping them to Control- and Alt-based (
ctrl-...,alt-...) keyboard shortcuts.
- 1password_mac.py implements these actions for macOS, mapping them to native Command-based (
- Voice Commands:
- 1password_global.talon provides global commands that can be spoken from any application (e.g., inside a web browser) to trigger 1Password's auto-fill or quick-access overlay.
- 1password.talon provides commands that only activate when the 1Password desktop application itself is focused (such as creating or duplicating an entry).
Core Components
password_manager.py
This Python script serves as the interface definition. It sets up the one_password app identifier for Talon to match across different operating systems:
- macOS:
app.bundle: com.agilebits.onepassword7 - Windows:
app.name: 1Password for Windows desktoporapp.name: 1Password.exe
It also registers empty action signatures under the user namespace so they can be implemented dynamically by platform-specific contexts.
1password_mac.py and 1password_win.py
These scripts bind the abstract user actions to concrete keystrokes depending on the host operating system.
For example, when user.password_fill() is called:
* On macOS, it presses cmd-\
* On Windows, it presses ctrl-\\
Similarly, editing an entry (user.password_edit()) sends cmd-e on macOS and ctrl-e on Windows.
1password_global.talon
This file defines voice commands that are active everywhere. It maps simple voice triggers to global password manager functions:
password fill: Callsuser.password_fill(), prompting 1Password to fill in your credentials on the currently active web page or login prompt.password show: Callsuser.password_show(), opening the 1Password Quick Access menu.
1password.talon
This file restricts its voice commands to when the 1Password application itself is active (app: one_password). It enables convenient voice shortcuts for managing entries within your vaults:
password new: Creates a new login or item.password dup: Duplicates the selected item.password edit: Begins editing the selected item.password delete: Deletes the selected item.