-
Notifications
You must be signed in to change notification settings - Fork 780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Talon v0.4 support: common commands for talon python / talon files / .talon-list files #1240
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
8d98ecd
v0.4 common commands across talon list and talon files
knausj85 76fc086
talent debug window support
knausj85 f55ca6c
Various cleanup and fixes
knausj85 e57e770
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] f6887d3
More tweaks and fixes
knausj85 f2b2a9b
Merge branch 'common-commands' of https://github.com/talonhub/communi…
knausj85 c2fadd0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] e489cd0
minor tweaks
knausj85 f35a77a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 6c952d6
Update talon_debug.talon
knausj85 6b3073a
Update talon-context.talon
knausj85 b551c2c
address review feedback
knausj85 bb50a16
Update talon.py
knausj85 0ff93a5
Merge branch 'main' into common-commands
nriley 9a85b71
Rename talon-common.talon to talon_common.talon
knausj85 a50afd1
Rename talon-python-activator.talon to talon_python_activator.talon
knausj85 5616f2c
Rename talon-context.talon to talon_context.talon
knausj85 bea9c59
Rename talon-code_common_function.talon-list to talon_code_common_fun…
knausj85 c8c99fc
Update talon_context.talon
knausj85 535424f
address remaining review feedback
knausj85 cc2d0cc
Merge branch 'main' into common-commands
knausj85 748c33b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] cf9ed61
Update to use code.language
knausj85 4a6f124
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 1e84b75
Update language_modes.py
knausj85 47148cb
Merge branch 'common-commands' of https://github.com/talonhub/communi…
knausj85 31e24ca
Merge branch 'main' into common-commands
knausj85 7631f00
Merge branch 'main' into common-commands
knausj85 f97d51e
talon_code_insert_action_call
knausj85 0e144f6
Update talon_debug_window.talon
knausj85 ee2e970
Merge branch 'main' into common-commands
knausj85 4f2ad46
Update talon_python_activator.talon
knausj85 50fea8a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] a03d024
Update talon_python_activator.talon
knausj85 bfcff72
Merge branch 'main' into common-commands
nriley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,16 @@ | ||
# this functionality is only available in the talon beta | ||
from talon import Module | ||
|
||
mod = Module() | ||
mod.apps.talon_debug_window = """ | ||
os: mac | ||
and app.bundle: com.talonvoice.Talon | ||
win.title: Talon Debug | ||
""" | ||
mod.apps.talon_debug_window = """ | ||
os: windows | ||
and app.name: Talon | ||
os: windows | ||
and app.exe: talon.exe | ||
win.title: Talon Debug | ||
""" |
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,24 @@ | ||
# this functionality is only available in the talon beta | ||
# note: these commands are only useful when the search box is focused | ||
app: talon_debug_window | ||
- | ||
# uncomment user.talon_populate_lists tag to activate talon-specific lists of actions, scopes, modes etcetera. | ||
# Do not enable this tag with dragon, as it will be unusable. | ||
# with conformer, the latency increase may also be unacceptable depending on your cpu | ||
# see https://github.com/talonhub/community/issues/600 | ||
# tag(): user.talon_populate_lists | ||
|
||
tag {user.talon_tags}: "{talon_tags}" | ||
|
||
#commands for dictating key combos | ||
key <user.keys> over: "{keys}" | ||
key <user.modifiers> over: "{modifiers}" | ||
|
||
action {user.talon_actions}: "{talon_actions}" | ||
# requires user.talon_populate_lists tag. do not use with dragon | ||
list {user.talon_lists}: "{talon_lists}" | ||
|
||
# requires user.talon_populate_lists tag. do not use with dragon | ||
capture {user.talon_captures}: "{talon_captures}" | ||
set {user.talon_settings}: "{talon_settings}" | ||
application {user.talon_apps}: "{talon_apps}" |
File renamed without changes.
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,5 @@ | ||
code.language: talonlist | ||
- | ||
# requires user.talon_populate_lists tag. do not use with dragon | ||
list [require] {user.talon_lists}: "list: {talon_lists}" | ||
list [require]: "list: " |
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,7 @@ | ||
list: user.code_common_function | ||
code.language: talon | ||
- | ||
insert | ||
key | ||
repeat |
knausj85 marked this conversation as resolved.
Show resolved
Hide resolved
|
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 @@ | ||
#Defines commands common to both python and talon files | ||
code.language: talon | ||
code.language: python | ||
and tag: user.talon_python | ||
- | ||
tag set [{user.talon_tags}]: | ||
tag = talon_tags or "" | ||
user.talon_code_enable_tag(tag) | ||
|
||
# requires user.talon_populate_lists tag. do not use with dragon | ||
list {user.talon_lists}: "{{{talon_lists}}}" | ||
# requires user.talon_populate_lists tag. do not use with dragon | ||
capture {user.talon_captures}: "<{talon_captures}>" | ||
|
||
setting {user.talon_settings}: user.talon_code_enable_setting(talon_settings) | ||
|
||
#commands for dictating key combos | ||
key <user.keys> over: "{keys}" | ||
key <user.modifiers> over: "{modifiers}" | ||
|
||
action {user.talon_actions}: | ||
user.talon_code_insert_action_call(talon_actions, edit.selected_text()) |
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 @@ | ||
code.language: talon | ||
code.language: talonlist | ||
code.language: python | ||
and tag: user.talon_python | ||
- | ||
#context requirements | ||
win require: insert("os: windows\n") | ||
mac require: insert("os: mac\n") | ||
linux require: insert("os: linux\n") | ||
title require: insert("win.title: ") | ||
application [require] [{user.talon_apps}]: | ||
app = "{talon_apps}\n" or "" | ||
insert("app: {app}") | ||
mode require [{user.talon_modes}]: | ||
mode = "{talon_modes}\n" or "" | ||
insert("mode: {mode}") | ||
tag require [{user.talon_tags}]: | ||
tag = "{talon_tags}\n" or "" | ||
insert("tag: {tag}") | ||
host require: | ||
hostname = user.talon_get_hostname() | ||
insert("hostname: {hostname}\n") |
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,14 @@ | ||
# This file activates talon-specific python commands | ||
# by default, it simply looks for the python tag to be active | ||
# lines 7-11 provide examples to make the activation more specific | ||
# which may be preferred by people who code in other python projects | ||
# app: vscode | ||
# Mac VSCode uses an em-dash | ||
# win.title: /— user/ | ||
# win.title: /— community/ | ||
# windows VSCode uses an en-dash | ||
# win.title: / - user - Visual Studio Code/ | ||
# win.title: / - community - Visual Studio Code/ | ||
code.language: python | ||
- | ||
tag(): user.talon_python |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be helpful if there is a comment that explains how to use these in the context of the Talon debug window.