-
Notifications
You must be signed in to change notification settings - Fork 855
More window phrases #1841
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
base: main
Are you sure you want to change the base?
More window phrases #1841
Changes from all commits
40b36fa
fbb5290
69bf1fe
f862b6d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| os: mac | ||
| - | ||
| app hide: user.app_hide() | ||
| app hide others: user.app_hide_others() | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| os: windows | ||
| os: linux | ||
| - | ||
| window (max | maximize): user.window_maximize() | ||
| window restore: user.window_restore() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,14 @@ | ||
| # defines the default app actions for linux | ||
|
|
||
| from talon import Context, actions | ||
| from talon import Context, actions, ui | ||
|
|
||
| ctx = Context() | ||
| ctx.matches = r""" | ||
| os: linux | ||
| """ | ||
|
|
||
|
|
||
| # TODO: Some keyboard shortcuts were obviously just copied from the Windows implementation. Correct what doesn't work. | ||
| @ctx.action_class("app") | ||
| class AppActions: | ||
| def tab_close(): | ||
|
|
@@ -26,10 +27,18 @@ def tab_reopen(): | |
| actions.key("ctrl-shift-t") | ||
|
|
||
| def window_close(): | ||
| actions.key("alt-f4") | ||
| if window := ui.active_window(): | ||
| # TODO: Does this work on Linux? | ||
| window.close() | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you sure doing this works on Linux?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can only test on Windows. |
||
| else: | ||
| actions.key("alt-f4") | ||
|
|
||
| def window_hide(): | ||
| actions.key("alt-space n") | ||
| if window := ui.active_window(): | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would recommend that you call
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no I can only test on Windows. |
||
| # TODO: Does this work on Linux? | ||
| window.minimized = True | ||
| else: | ||
| actions.key("alt-space n") | ||
|
|
||
| def window_hide_others(): | ||
| actions.key("win-d alt-tab") | ||
|
|
||
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.
From the community backlog session — don't think that we should declare actions equivalent to the built-in actions even if the built-in actions are misnamed. Users do not see the names of the actions that they are calling and we should just focus on making sure that the voice commands do what they say. So please switch back to
app.window_hideandapp.window_hide_others, thanks.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.
They do with the help UI. It shows the phrase and its TalonScript code, even comments inside the TalonScript code. But what the phrase conveys will of course be the primary source of information.
But the current PR's implementations (at least for
user.app_hide()andapp.window_hide()) are different:What do you mean by switching back? One hides the whole app, the other hides a single window.
The names aren't incorrect, even if undesirable. (But shouldn't Talon offer experience-based non-
usernamespace extensions in the long run?)app.window_hide(), e.g., conveys that it hides a single window of an app. If Talon'sappnamespace was extended, my currentuser.app_hide()could becomeapp.hide().Do you want me to reduce Mac functionality again, or to name
user.app_hide()anduser.app_hide_others()differently or something like that? Shouldn't functionality rather be extended than limited?