diff --git a/apps/meld/meld.py b/apps/meld/meld.py new file mode 100644 index 0000000000..564913eecf --- /dev/null +++ b/apps/meld/meld.py @@ -0,0 +1,44 @@ +from talon import Context, Module, actions + +mod = Module() +ctx = Context() + +apps = mod.apps +apps.meld = """ +os: windows +and app.name: Visual diff and merge tool +os: windows +and app.exe: meld.exe +""" + +ctx.matches = r""" +app: meld +""" + + +@ctx.action_class("app") +class AppActions: + def tab_open(): + actions.key("ctrl-n") + + def tab_previous(): + actions.key("ctrl-alt-pageup") + + def tab_next(): + actions.key("ctrl-alt-pagedown") + + def tab_reopen(): + print("Meld does not support this action.") + + +@ctx.action_class("user") +class UserActions: + def tab_jump(number): + if number < 10: + actions.key(f"alt-{number}") + + def tab_final(): + print("Meld does not support this action.") + + def tab_duplicate(): + print("Meld does not support this action.") diff --git a/apps/meld/meld.talon b/apps/meld/meld.talon new file mode 100644 index 0000000000..f237c17a19 --- /dev/null +++ b/apps/meld/meld.talon @@ -0,0 +1,6 @@ +app: meld +- +tag(): user.tabs + +change next: key(alt-down) +change (previous | last): key(alt-up)