forked from talonhub/community
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main'
- Loading branch information
Showing
100 changed files
with
1,786 additions
and
229 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
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
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
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
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
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
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
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,64 @@ | ||
from talon import Context, Module, actions | ||
|
||
mod = Module() | ||
ctx = Context() | ||
|
||
# --- App definition --- | ||
mod.apps.foxit_reader = r""" | ||
os: windows | ||
and app.name: /^Foxit Reader/ | ||
os: windows | ||
and app.exe: /^foxitreader\.exe$/i | ||
os: windows | ||
and app.name: Foxit PDF Reader | ||
os: windows | ||
and app.exe: /^foxitpdfreader\.exe$/i | ||
""" | ||
# Context matching | ||
ctx.matches = """ | ||
app: foxit_reader | ||
""" | ||
|
||
|
||
@ctx.action_class("app") | ||
class AppActions: | ||
# app.tabs | ||
def tab_open(): | ||
actions.key("ctrl-o") | ||
|
||
def tab_reopen(): | ||
actions.app.notify("Foxit does not support this action.") | ||
|
||
|
||
@ctx.action_class("user") | ||
class UserActions: | ||
# user.tabs | ||
def tab_jump(number): | ||
actions.app.notify("Foxit does not support this action.") | ||
|
||
def tab_final(): | ||
actions.app.notify("Foxit does not support this action.") | ||
|
||
def tab_duplicate(): | ||
actions.app.notify("Foxit does not support this action.") | ||
|
||
# user.pages | ||
def page_current() -> int: | ||
actions.key("ctrl-g") | ||
page = actions.edit.selected_text() | ||
return int(page) | ||
|
||
def page_next(): | ||
actions.key("right") | ||
|
||
def page_previous(): | ||
actions.key("left") | ||
|
||
def page_jump(number: int): | ||
actions.key("ctrl-g") | ||
actions.insert(str(number)) | ||
actions.key("enter") | ||
|
||
def page_final(): | ||
# actions.key("fn-right") | ||
actions.key("end") |
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,11 @@ | ||
app: foxit_reader | ||
- | ||
tag(): user.tabs | ||
tag(): user.pages | ||
|
||
tab close all: key(ctrl-shift-w) | ||
|
||
[page] rotate right: key("shift-ctrl-keypad_equals") | ||
[page] rotate left: key("shift-ctrl-keypad_minus") | ||
|
||
go back: key(alt-left) |
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) |
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
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
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,22 @@ | ||
from talon import Context, Module, actions | ||
|
||
ctx = Context() | ||
mod = Module() | ||
|
||
mod.apps.notepad = r""" | ||
os: windows | ||
and app.exe: notepad.exe | ||
""" | ||
|
||
ctx.matches = r""" | ||
app: notepad | ||
""" | ||
|
||
|
||
@ctx.action_class("win") | ||
class win_actions: | ||
def filename(): | ||
filename = actions.win.title().split(" - ")[0] | ||
if "." in filename: | ||
return filename | ||
return "" |
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,5 @@ | ||
app: notepad | ||
- | ||
|
||
tag(): user.tabs | ||
tag(): user.find_and_replace |
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
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,21 @@ | ||
from talon import Context, Module | ||
|
||
mod = Module() | ||
ctx = Context() | ||
|
||
mod.apps.stata = r""" | ||
os: windows | ||
and app.name: Stata | ||
os: windows | ||
and app.exe: /^statase\-64\.exe$/i | ||
""" | ||
|
||
ctx.matches = r""" | ||
app: stata | ||
""" | ||
|
||
|
||
@ctx.action_class("code") | ||
class CodeActions: | ||
def language(): | ||
return "stata" |
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,25 @@ | ||
# Commands for the Stata Do-File Editor | ||
os: windows | ||
app: stata | ||
win.title: /^Do-file Editor/ | ||
- | ||
do this: key(ctrl-d) | ||
|
||
do line: | ||
edit.select_line() | ||
key(ctrl-d) | ||
|
||
do (all | file): | ||
edit.select_all() | ||
edit.copy() | ||
key(ctrl-d) | ||
|
||
do way up: | ||
edit.extend_file_start() | ||
edit.copy() | ||
key(ctrl-d) | ||
|
||
do way down: | ||
edit.extend_file_end() | ||
edit.copy() | ||
key(ctrl-d) |
Oops, something went wrong.