-
Notifications
You must be signed in to change notification settings - Fork 783
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: port from resource.open to resource.watch & initial talon-list conversions #1239
Conversation
- | ||
`: ` |
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.
This can be moved to a dragon specific punctuation list.
default_digits = "zero one two three four five six seven eight nine".split(" ") | ||
numbers = [str(i) for i in range(10)] | ||
default_f_digits = ( | ||
"one two three four five six seven eight nine ten eleven twelve".split(" ") |
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.
Merge error, can be removed.
#todo: if we wanted to convert this | ||
# we'd probably want to rework the list to have hard-coded strings | ||
# like e.g. BRACES on the right side. | ||
# list: user.navigation_target_name | ||
# - |
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.
I'm leaving a note here for discussion purposes. I don't think this should be converted as is.
down: down | ||
left: left | ||
right: right | ||
up: up |
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.
You can just do up
instead of up: up
in all of these identity mapped lists. With up: up it's actually kind of confusing which side to edit too.
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.
It's arguably a bit more convenient for those that may customize to keep up: up though.
This is a similar problem to eg https://github.com/talonhub/community/blob/7b09a4a789ed1dc380865d2840a5abda9f65af25/core/windows_and_tabs/window_snap_positions.talon-list
where we may be better off with something more obviously not a spoken form on the right side.
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.
I think up: up
is not more convenient at all, because it's not obvious which side to edit when the sides are symmetrical. I think using a non spoken form on the right hand side is also bad (in the case of key mappings), because the right hand side is a key name. You shouldn't map those to something else.
up
on a line by itself should be fine. It's easy enough to teach people how to work with these files I think. We're still much better off than the "simple key names" in Python where you had to move the key to a different list if you wanted to remap it.
If the file contains:
list: user.arrow_key
-
up
down
left
right
I want to remove "up" and add "shoop" mapped to up. I need to know what the existing lines in the .talon-list
mean, and I need to know how to add a line. I need to know this regardless of whether the file contains up: up
or just up
.
-up
+shoop: up
Anyway. Don't do up: up
. Not worth bike shedding.
@@ -36,6 +37,7 @@ talon dump context: | |||
user.talon_action_find("{user.talon_actions}") | |||
^talon debug list {user.talon_lists}$: user.talon_debug_list(talon_lists) | |||
^talon copy list {user.talon_lists}$: user.talon_copy_list(talon_lists) | |||
^talon convert list {user.talon_lists}$: user.talon_convert_list(user.talon_lists) |
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.
Probably remove this
for more information, see https://pre-commit.ci
return decorator | ||
|
||
|
||
# NOTE: this is deprecated, use @track_csv_list instead. |
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.
TODO: raise a Deprecation/FutureWarning?
@@ -184,6 +184,9 @@ class Resource: | |||
def open(self, path: str, mode: str = "r"): | |||
return open(path, mode, encoding="utf-8") | |||
|
|||
def watch(self, path: str): | |||
pass |
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.
Shouldn't this return an identity function?
pass | |
return lambda f: f |
Co-authored-by: David Vo <auscompgeek@users.noreply.github.com>
Splitting #1234 into a few pull requests for convenience. This is not fully vetted yet, opening a draft for convenience and initial discussion.
todo:
Questions: