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
usernamespace, specificallytab_jump(number), which allows the user to jump to a specific tab usingalt-number. - It defines actions in the
appnamespace, includingtab_open,tab_previous,tab_next, andtab_closewhich provide basic tab management. It also defineswindow_opento open a new Konsole window. - It overrides some default
editactions to match the keyboard shortcuts used by Konsole. For example,pasteis mapped toctrl-shift-v, andcopyis mapped toctrl-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
terminaltag, which enables commands defined interminal.talon. - It activates the
user.generic_unix_shelltag, which provides generic Unix shell commands. - It activates tags for specific command-line applications, such as
user.gitanduser.anaconda. It also includes a commented-out tag foruser.kubectl, that can be uncommented if that application is needed. - It activates the
user.tabstag, 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.