Skip to content

gnome_terminal

This directory, community/apps/gnome_terminal, contains configuration files for the Gnome Terminal application within the Talon voice control system. It defines how Talon interacts with Gnome Terminal by mapping voice commands to specific actions.

The core functionality is defined in two files:

  • gnome_terminal.py: This Python file defines the application context and custom actions for Gnome Terminal.

    • It starts by defining an application definition for Gnome Terminal, matching various executable names and application names.
    • It then defines a context (ctx) which matches when the Gnome Terminal app is active.
    • Within the context, it defines two action classes: user_actions and app_actions. The user_actions class overrides the tab_jump action to enable jumping between tabs using alt-number keys. The app_actions class defines several actions related to managing tabs and windows, such as opening, closing, and switching between tabs. Additionally, it overrides the global actions for opening and closing windows.
    • Finally, it overrides several edit actions to provide page_up, page_down, paste, copy, find, and delete_line. It also defines several extend selection actions as pass because they are not supported by Gnome Terminal.
  • gnome_terminal.talon: This Talon script activates several tags when the Gnome Terminal app is active. These tags enable functionality and voice commands from other parts of the Talon configuration. The tags include:

    • terminal: Enables generic terminal commands.
    • user.tabs: Enables tab management commands.
    • user.generic_unix_shell: Enables commands specific to Unix-like shells.
    • user.git: Enables commands related to Git.
    • user.kubectl: Enables commands related to Kubernetes.

In summary, the files in this directory configure Gnome Terminal for use with Talon. The Python file defines actions and mappings to keyboard shortcuts, while the Talon file applies tags to enable further functionality. Together, these files allow users to control Gnome Terminal using voice commands for tab management, window management, text editing, and various developer-centric functions like shell interaction, Git, and Kubernetes.