core
The community/core
directory contains the core functionality of the Talon community configuration. It includes a variety of subdirectories and files that manage aspects of Talon such as code snippets, vocabulary, key bindings, text formatting, and application switching.
Here's a breakdown of the most important subdirectories and files, and how they work together:
-
abbreviate
: This directory containsabbreviate.py
, which defines a system for expanding abbreviations in Talon. It uses a dictionary of abbreviations and their expansions, and it can be customized with a CSV file namedabbreviations.csv
. -
app_switcher
: This directory contains files that allow users to switch between and launch applications using voice commands. The core logic is inapp_switcher.py
, which uses platform-specific CSV files to manage application names and spoken overrides. -
edit
: This directory provides core editing functionality for Talon, including actions for navigating, selecting, and manipulating text. It includes platform-specific files (edit_linux.py
,edit_mac.py
,edit_win.py
) and more advanced editing functionality in files such asedit.py
,edit_command.py
,edit_command_modifiers.py
,edit_command_actions.py
,edit_navigation_steps.py
, andedit_paragraph.py
. It also includes files for managing delimiter pairs (delimiter_pair.py
) and inserting text between two points (insert_between.py
). These are all used by the rules defined inedit.talon
. -
file_extension
: This directory contains the files for speaking file extensions using Talon. The core logic is infile_extension.py
, which defines a Talon listuser.file_extension
that is populated by a CSV file namedfile_extensions.csv
. This list is used in the rule defined infile_extension.talon
. -
formatters
: This directory contains files for formatting text within Talon. The core logic is informatters.py
, which defines various text formatters, likeCodeFormatter
,TitleFormatter
,CapitalizeFormatter
, andSentenceFormatter
. The formatters are used by theword_formatter
,code_formatter
,prose_formatter
, andreformatter
lists defined in the.talon-list
files in this directory. -
help
: This directory provides a help system for Talon. It includeshelp.py
, which manages the display of help information in an ImGui window andhelp_scope.py
, which displays the current Talon scope. It also includes Talon files to trigger the help system and to navigate the help window:help.talon
,help_open.talon
, andhelp_scope_open.talon
. -
homophones
: This directory contains files that allow for the selection of homophones using a GUI. The core logic is inhomophones.py
, which parseshomophones.csv
and creates a GUI for selecting homophones. Thehomophones.talon
file provides the commands for triggering the functionality, andhomophones_open.talon
provides commands for using the open GUI. -
keys
: This directory provides configuration files for mapping spoken words to keyboard keys. It includes platform-specific subdirectories (mac
andwin
), as well as several key definition files (e.g.,arrow_key.talon-list
,number_key.talon-list
,function_key.talon-list
,letter.talon-list
). These lists are used by the core files in this directory:keys.talon
, which defines grammar rules for using the keys, andkeys.py
, which defines the lists and capture rules. -
menu_choose
: This directory allows for selecting items from menus using voice commands. The actionschoose
andchoose_up
are defined inmenu_choose.py
and triggered with voice commands inmenu_choose.talon
. -
modes
: This directory defines and manages different modes of operation for Talon, such as "sleep", "command", "dictation", and language modes. The core logic is inmodes.py
. It also includes files such assleep_mode.talon
,command_and_dictation_mode.talon
,modes_not_dragon.talon
,language_modes.py
, andcode_languages.py
. The directory also includes platform-specific files likedragon_mode.talon
, andmodes_dragon.talon
for controlling Dragon, andsleep_mode_wav2letter.talon
for thewav2letter
speech engine. -
mouse_grid
: This directory contains the code for the mouse grid system. The core logic is inmouse_grid.py
, which defines theMouseSnapNine
class. The commands for interacting with the mouse grid are defined inmouse_grid_always.talon
andmouse_grid_open.talon
. -
navigation
: This directory contains files for navigating forward and backward, using different keybindings based on the context. It usesnavigation.py
to define the actions for each context, andnavigation.talon
to bind the commands. -
numbers
: This directory provides files for parsing and representing numbers using voice commands. The core logic is innumbers.py
, which defines how numbers are parsed. It also includesordinals.py
, which defines lists of ordinal words. The Talon bindings for these files are provided bynumbers_unprefixed.talon
andnumbers_prefixed.talon
. -
screens
: This directory contains files for managing and displaying information about multiple screens. The core logic is inscreens.py
, which provides actions for showing screen numbers, and the command to use the actions is inscreens.talon
. -
snippets
: This directory contains the code for handling code snippets. It includessnippets.py
for managing and using snippets,snippets_parser.py
for parsing snippet files,snippets_insert.py
for inserting snippets,snippets_insert_raw_text.py
for inserting raw text, andsnippet_types.py
for defining dataclasses used in the other files. The snippets themselves are stored in thesnippets/snippets
subdirectory as.snippet
files. The directory also includessnippets.talon
, which defines the Talon commands for using the snippets. -
text
: This directory defines how Talon handles text input and formatting. It includes lists of words and phrases in files such ascurrency.talon-list
,prose_modifiers.talon-list
,prose_snippets.talon-list
, andphrase_ender.talon-list
. The commands for manipulating text are defined intext.talon
. The core logic for text formatting and dictation is intext_and_dictation.py
, which defines captures for words, phrases, and prose, and theDictationFormat
class, which is used to format text. This directory also includesphrase_history.py
, which manages a history of recently spoken phrases. -
vocabulary
: This directory contains files that manage custom vocabulary and word replacement for Talon. The core logic is invocabulary.py
, which defines how custom vocabulary is loaded, modified, and used. It useswords_to_replace.csv
andvocabulary.talon-list
to store the user's customizations. The Talon commands to use the actions are defined inedit_vocabulary.talon
. -
websites_and_search_engines
: This directory contains files that allow users to quickly navigate to websites and perform searches using voice commands. It uses lists inwebsite.talon-list
andsearch_engine.talon-list
to store website and search engine URLs. The logic for the actions is inwebsites_and_search_engines.py
, and the voice commands to use the actions are defined inwebsites_and_search_engines.talon
. -
windows_and_tabs
: This directory contains files for managing windows and tabs across different operating systems. It includeswindow_snap.py
for snapping windows to specific screen positions and platform-specific files (windows_and_tabs_win.py
,windows_and_tabs_mac.py
, andwindows_and_tabs_linux.py
) for common window and tab actions. Generic tab actions are intabs.py
, and cross-platform window cycling actions are inwindows_and_tabs.py
. The voice commands for using the actions are defined inwindow_management.talon
andtabs.talon
.
In addition to these subdirectories, the community/core
directory also contains the following files:
app_running.py
: This file defines a Talon scope that tracks running applications.dragon_engine.py
: This file defines actions for controlling the Dragon speech engine.README.md
: This file provides a high-level overview of thecommunity/core
directory.tags.py
: This file defines tags for loading various modules and plugins.system_command.py
: This file defines actions for executing system commands.deprecations.py
: This file defines actions for deprecating voice commands, actions, and captures.create_spoken_forms.py
: This file defines actions for creating spoken forms of strings.system_paths.py
: This file defines a list of system paths and a capture for using those paths.delayed_speech_off.py
: This file defines actions to enable and disable speech recognition.application_matches.py
: This file defines application matching patterns.noise.py
: This file defines actions that are triggered by noises.user_settings.py
: This file provides helper functions for managing user settings.
These files and subdirectories work together to provide a comprehensive set of features and functionality for the Talon voice control system.