Skip to content

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 contains macro.talon, which defines voice commands for recording, playing, saving, and copying macros, and macro.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 includes desktops.py, which defines the basic actions, desktops.talon, which exposes the actions via voice commands, and platform-specific implementations in desktops_mac.py, desktops_linux.py, and desktops_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 includes mouse_cursor.py which controls the mouse cursor, mouse.talon which provides the voice commands for mouse control, mouse.py which defines mouse actions, and mouse_scroll.py which 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 includes draft_talon_helpers.py which initializes the module, contexts, and actions, draft_ui.py which manages the text area and labels, draft_window_open.talon and draft_window.talon which define voice commands, and draft_global.talon for global commands.
  • repeater: This directory adds functionality to repeat commands and phrases. It includes pop_twice_to_repeat.py which repeats a command on a double pop noise, and repeater.talon which 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 includes datetimeinsert.py, which defines the actions for formatting time, and datetimeinsert.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 includes cancel.py which handles the cancellation logic, and cancel.talon which defines the "cancel cancel" command.
  • subtitles: This directory provides a plugin to display subtitles of speech input on the screen. It includes on_phrase.py which captures spoken phrases, subtitles.py which handles the display logic and settings, and subtitles.talon which defines the default settings.
  • are_you_sure: This directory implements a confirmation dialog before executing a potentially destructive action. It includes are_you_sure.py which manages the confirmation dialog, and are_you_sure.talon which defines the voice commands for confirming or canceling.
  • talon_helpers: This directory contains debugging and helper utilities for Talon. It contains talon_helpers.talon for voice commands, talon_helpers.py for python actions, and create_app_context.py for actions related to creating new app contexts.
  • gamepad: This directory provides gamepad support for Talon. It includes gamepad.py and gamepad.talon which implement the core gamepad functionality, and gamepad_tester.py and related .talon files which implement an on-screen visual representation of the gamepad state.
  • text_navigation: This directory implements advanced text navigation using voice. It includes text_navigation.py which contains the logic for moving, selecting, and deleting text, and text_navigation.talon, before_or_after.talon-list and navigation_action.talon-list which define the voice commands and vocabulary.
  • then: This directory includes then.talon, which provides a "then" command to chain otherwise ambiguous commands.
  • microphone_selection: This directory contains files for a microphone selection UI. It includes microphone_selection.py which creates the UI, and microphone_selection.talon which provides the voice commands.
  • draft_editor: This directory contains files for using a text editor as a draft editor in Talon. It includes draft_editor.py which manages the draft editor, and draft_editor.talon and draft_editor_open.talon which 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 contains symbols_deprecated.talon with deprecated commands, and symbols.talon for the new preferred method of inserting symbols.
  • media: This directory implements basic media controls. It includes media.py, which defines a custom play_pause action, and media.talon, which exposes the action as a voice command.
  • command_history: This directory adds command history functionality to Talon. It includes command_history.py, which manages the command history, and command_history.talon, which defines voice commands to display and manage the history.
  • screenshot: This directory provides screenshot functionality in Talon. It includes screenshot.py which defines the screenshot actions, and screenshot.talon which defines voice commands for taking screenshots.
  • mode_indicator: This directory implements a graphical mode indicator. It includes mode_indicator.py which defines the logic for displaying the mode indicator, and mode_indicator.talon which defines the default settings.
  • listening_timeout: This directory implements a timeout for speech recognition. It contains listening_timeout.py which 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 default insert action to paste text above a certain threshold defined by the user.paste_to_insert_threshold setting. 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.