Skip to content

Commit

Permalink
Meld (#1402)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbruening authored Apr 14, 2024
1 parent afb2246 commit 679bdfb
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
44 changes: 44 additions & 0 deletions apps/meld/meld.py
Original file line number Diff line number Diff line change
@@ -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.")
6 changes: 6 additions & 0 deletions apps/meld/meld.talon
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
app: meld
-
tag(): user.tabs

change next: key(alt-down)
change (previous | last): key(alt-up)

0 comments on commit 679bdfb

Please sign in to comment.