-
Notifications
You must be signed in to change notification settings - Fork 780
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
afb2246
commit 679bdfb
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |