Skip to content
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

Improve window_action API usages #57

Open
2 tasks
phillco opened this issue Jun 19, 2023 · 0 comments
Open
2 tasks

Improve window_action API usages #57

phillco opened this issue Jun 19, 2023 · 0 comments

Comments

@phillco
Copy link
Owner

phillco commented Jun 19, 2023

  • In v0.4/Rust, use the new window properties, like window.minimized, to minimize/close/fullscreen windows.
  • In v0.3, we should read/modify the window properties, rather than simulate button presses. For example win.element.AXFullScreen. We should also stop using a shortcut to get out of fullscreen mode.

Optionally, we can also use appscript for more of the mass-windowing commands. For example, this will minimize every window:

app('Finder').windows.collapsed.set(True)

But unlike closing every window (#55), this doesn't seem to be particularly faster in my testing. I think Talon itself generally prefers to use appscript when it's available, and then fallback to accessibility (for example, for changing window positions). But I'm not sure if there's any other advantages are disadvantages. cc @nriley for thoughts

phillco added a commit that referenced this issue Jul 13, 2023
In #55 it was pointed out
that the existing commands used verb-noun, which is less standard.

Also added the missing `<user.running_applications> window
{user.window_actions}`, so you can target (close or minimize) the most
recent window of another application. More situational, but I don't see
a reason not to fill out the matrix.

The fullscreen logic needs a little work after this. Filed
#57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant