plugin
The community/plugin directory contains a collection of subdirectories, each implementing a distinct set of features to enhance the Talon voice control experience. These plugins range from basic text manipulation and command repetition to complex desktop management and custom UI elements.
Here's an overview of the most significant subdirectories and files:
macro: This directory implements a macro recording and playback system. It containsmacro.talon, which defines voice commands for recording, playing, saving, and copying macros, andmacro.py, which contains the Python logic for managing the macro recording and playback process. These files work together to allow users to automate sequences of voice commands.desktops: This directory provides cross-platform virtual desktop management. It includesdesktops.py, which defines the basic actions,desktops.talon, which exposes the actions via voice commands, and platform-specific implementations indesktops_mac.py,desktops_linux.py, anddesktops_win.py. This allows users to switch between virtual desktops and move windows across them using voice.mouse: This directory provides comprehensive mouse control through voice. It includesmouse_cursor.pywhich controls the mouse cursor,mouse.talonwhich provides the voice commands for mouse control,mouse.pywhich defines mouse actions, andmouse_scroll.pywhich implements mouse wheel scrolling and gaze-based scrolling.talon_draft_window: This directory contains code for a dedicated text editing window, leveraging word labels for voice-driven manipulation. It includesdraft_talon_helpers.pywhich initializes the module, contexts, and actions,draft_ui.pywhich manages the text area and labels,draft_window_open.talonanddraft_window.talonwhich define voice commands, anddraft_global.talonfor global commands.repeater: This directory adds functionality to repeat commands and phrases. It includespop_twice_to_repeat.pywhich repeats a command on a double pop noise, andrepeater.talonwhich defines voice commands for repeating actions, phrases, and commands a specified number of times.datetimeinsert: This directory provides a plugin for inserting the current date and time in various formats. It includesdatetimeinsert.py, which defines the actions for formatting time, anddatetimeinsert.talon, which exposes the actions via voice commands.cancel: This directory provides a way to cancel a spoken command using the phrase "cancel cancel". It includescancel.pywhich handles the cancellation logic, andcancel.talonwhich defines the "cancel cancel" command.subtitles: This directory provides a plugin to display subtitles of speech input on the screen. It includeson_phrase.pywhich captures spoken phrases,subtitles.pywhich handles the display logic and settings, andsubtitles.talonwhich defines the default settings.are_you_sure: This directory implements a confirmation dialog before executing a potentially destructive action. It includesare_you_sure.pywhich manages the confirmation dialog, andare_you_sure.talonwhich defines the voice commands for confirming or canceling.talon_helpers: This directory contains debugging and helper utilities for Talon. It containstalon_helpers.talonfor voice commands,talon_helpers.pyfor python actions, andcreate_app_context.pyfor actions related to creating new app contexts.gamepad: This directory provides gamepad support for Talon. It includesgamepad.pyandgamepad.talonwhich implement the core gamepad functionality, andgamepad_tester.pyand related.talonfiles which implement an on-screen visual representation of the gamepad state.text_navigation: This directory implements advanced text navigation using voice. It includestext_navigation.pywhich contains the logic for moving, selecting, and deleting text, andtext_navigation.talon,before_or_after.talon-listandnavigation_action.talon-listwhich define the voice commands and vocabulary.then: This directory includesthen.talon, which provides a "then" command to chain otherwise ambiguous commands.microphone_selection: This directory contains files for a microphone selection UI. It includesmicrophone_selection.pywhich creates the UI, andmicrophone_selection.talonwhich provides the voice commands.draft_editor: This directory contains files for using a text editor as a draft editor in Talon. It includesdraft_editor.pywhich manages the draft editor, anddraft_editor.talonanddraft_editor_open.talonwhich define the voice commands for opening, submitting, and discarding the draft.symbols: This directory provides commands for inserting and wrapping text with various symbols. It containssymbols_deprecated.talonwith deprecated commands, andsymbols.talonfor the new preferred method of inserting symbols.media: This directory implements basic media controls. It includesmedia.py, which defines a customplay_pauseaction, andmedia.talon, which exposes the action as a voice command.command_history: This directory adds command history functionality to Talon. It includescommand_history.py, which manages the command history, andcommand_history.talon, which defines voice commands to display and manage the history.screenshot: This directory provides screenshot functionality in Talon. It includesscreenshot.pywhich defines the screenshot actions, andscreenshot.talonwhich defines voice commands for taking screenshots.mode_indicator: This directory implements a graphical mode indicator. It includesmode_indicator.pywhich defines the logic for displaying the mode indicator, andmode_indicator.talonwhich defines the default settings.listening_timeout: This directory implements a timeout for speech recognition. It containslistening_timeout.pywhich implements the timeout logic and settings.
Additionally, the directory contains these files directly in the community/plugin directory:
paste_to_insert.py: This file modifies the defaultinsertaction to paste text above a certain threshold defined by theuser.paste_to_insert_thresholdsetting. This allows longer blocks of text to be inserted more reliably than by repeatedly pressing keys.README.md: This file provides a high-level overview of the plugins contained in this directory.eye_tracking_settings.py: This file contains commented-out code to configure eye tracking and zoom mouse settings.
In summary, the community/plugin directory serves as a central location for a variety of useful Talon extensions, ranging from simple text manipulation to more complex functionalities like desktop management and custom UI elements. The plugins are implemented as a combination of Python files that handle logic and state, and .talon files that define the voice commands, often in conjunction with settings files to customize their behavior.