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, specificallytab_jump(number)
, which allows the user to jump to a specific tab usingalt-number
. - It defines actions in the
app
namespace, includingtab_open
,tab_previous
,tab_next
, andtab_close
which provide basic tab management. It also defineswindow_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 toctrl-shift-v
, andcopy
is 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
terminal
tag, which enables commands defined interminal.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
anduser.anaconda
. It also includes a commented-out tag foruser.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.