Skip to content

kde_konsole

The community/apps/kde_konsole directory contains files that provide Talon support for the KDE Konsole terminal application on Linux.

The file kde_konsole.py defines the core logic for interacting with Konsole. It does the following:

  • It establishes a Talon context that is active when the application name is "konsole".
  • It defines actions in the user namespace, specifically tab_jump(number), which allows the user to jump to a specific tab using alt-number.
  • It defines actions in the app namespace, including tab_open, tab_previous, tab_next, and tab_close which provide basic tab management. It also defines window_open to open a new Konsole window.
  • It overrides some default edit actions to match the keyboard shortcuts used by Konsole. For example, paste is mapped to ctrl-shift-v, and copy is mapped to ctrl-shift-c. It also remaps page up and page down to use shift.

The file kde_konsole.talon is a Talon script that activates the functionality defined in kde_konsole.py and imports other relevant tags. Specifically:

  • It sets up the context to only apply when the OS is Linux and the application name is "konsole".
  • It activates the terminal tag, which enables commands defined in terminal.talon.
  • It activates the user.generic_unix_shell tag, which provides generic Unix shell commands.
  • It activates tags for specific command-line applications, such as user.git and user.anaconda. It also includes a commented-out tag for user.kubectl, that can be uncommented if that application is needed.
  • It activates the user.tabs tag, which enables tab-related commands.
  • It includes a comment about future support for file manager commands.

These two files work together to provide a comprehensive set of commands for interacting with KDE Konsole using Talon. The .py file defines the actions and the .talon file specifies the context in which those actions are available.