init commit
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
from talon import Context, actions
|
||||
|
||||
ctx = Context()
|
||||
ctx.matches = r"""
|
||||
app.name: konsole
|
||||
"""
|
||||
|
||||
|
||||
@ctx.action_class("user")
|
||||
class user_actions:
|
||||
# tabs-tag functions implementations
|
||||
def tab_jump(number):
|
||||
actions.key(f"alt-{number}")
|
||||
|
||||
# tab_final is not supported by konsole by default
|
||||
# but short cut can be configured
|
||||
|
||||
|
||||
@ctx.action_class("app")
|
||||
class app_actions:
|
||||
# tabs-tag functions implementations
|
||||
def tab_open():
|
||||
actions.key("ctrl-shift-t")
|
||||
|
||||
def tab_previous():
|
||||
actions.key("shift-left")
|
||||
|
||||
def tab_next():
|
||||
actions.key("shift-right")
|
||||
|
||||
def tab_close():
|
||||
actions.key("ctrl-shift-w")
|
||||
|
||||
def tab_reopen():
|
||||
# TODO: decide whether this notification is good style
|
||||
# (if this function wouldn't be defined here a wrong default would be activated)
|
||||
actions.app.notify("tab reopen is not possible in kde konsole")
|
||||
|
||||
def window_open():
|
||||
actions.key("ctrl-shift-n")
|
||||
|
||||
|
||||
# this overwrites the unfitting parts of linux/edit.py
|
||||
@ctx.action_class("edit")
|
||||
class EditActions:
|
||||
def page_down():
|
||||
actions.key("shift-pagedown")
|
||||
|
||||
def page_up():
|
||||
actions.key("shift-pageup")
|
||||
|
||||
def paste():
|
||||
actions.key("ctrl-shift-v")
|
||||
|
||||
def copy():
|
||||
actions.key("ctrl-shift-c")
|
||||
|
||||
def find(text: str = None):
|
||||
actions.key("ctrl-shift-f")
|
||||
if str:
|
||||
actions.insert(text)
|
||||
|
||||
# TODO: fix select line and other selection (like shift-right)
|
||||
# see: https://unix.stackexchange.com/questions/485536/kde-konsole-swallows-shift-left-and-shift-right
|
||||
# also fix extend_left and co
|
||||
@@ -0,0 +1,17 @@
|
||||
os: linux
|
||||
and app.name: konsole
|
||||
-
|
||||
# makes the commands in terminal.talon available
|
||||
tag(): terminal
|
||||
|
||||
# activates the implementation of the commands/functions in terminal.talon
|
||||
tag(): user.generic_unix_shell
|
||||
|
||||
# makes commands for certain applications available
|
||||
# you can deactivate them if you do not use the application
|
||||
tag(): user.git
|
||||
tag(): user.anaconda
|
||||
# tag(): user.kubectl
|
||||
|
||||
tag(): user.tabs
|
||||
# TODO: add file_manager support
|
||||
Reference in New Issue
Block a user