Skip to content

terminal

This directory, community/tags/terminal, contains files that provide support for interacting with terminal applications using Talon. It includes implementations for both Unix-like and Windows terminals, as well as a more general set of actions and tags to support common workflows.

The core functionality is defined in terminal.py, which specifies the actions that are available for terminal interaction, such as terminal_list_directories, terminal_change_directory, and terminal_kill_all. These actions are then implemented for specific terminal environments.

The files unix_shell.py and windows_shell.py implement the terminal actions for Unix-like and Windows environments respectively. They provide the specific commands (e.g., ls, cd, clear) that will be executed when the corresponding actions are invoked. Both files also contain an example of how to add the user.unix_utilities tag to a context.

The file terminal.talon provides the voice commands for these terminal actions. For example, saying "lisa" will execute terminal_list_directories and "katie dir foo" will execute terminal_change_directory("foo"). It also provides some convenience commands such as "go" to change directory and "copy paste" to copy then paste.

The file readline.py provides actions for editing text in terminals using readline keybindings. This provides common commands for moving the cursor, deleting and copying text.

The files unix_utilities.py and unix_utilities.talon along with unix_utility.talon-list provide a tag and a list of common unix utilities that can be used in the terminal. The unix_utilities.py defines the user.unix_utilities tag and the user.unix_utility list. The unix_utility.talon-list defines the items in the user.unix_utility list, with commands like awk, base64, and grep. Finally, the unix_utilities.talon provides the voice command that uses the list to insert the selected command.

These files work together to provide a comprehensive set of voice commands for interacting with terminal applications, including common navigation, text manipulation, and utility commands.