Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
window_action: use appscript to close all windows (#55)
I noticed that stuff like "window close all" in applications like Finder was really slow and flaky, and would often result in several windows being left open if you had a lot open (probably because they technically treat tabs as windows). I was poking around with AppleScript and noticed that it's actually much faster and more reliable to just close all of the windows that way, ie with: ``` tell application "Finder" close every window end tell ``` It fixes the Finder issue, and even in applications previously behaved well, there is an improvement (all windows close immediately, rather than a cascade of closures as it iterates through them). So let's use that! I didn't do much to improve the "current window" and "other windows" use cases, although it probably not much work. I just wanted to knock this out quickly. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information