-
-
Save pythoninthegrass/8c9a0b98ef95e58656f32a3f9ca447f0 to your computer and use it in GitHub Desktop.
Close all windows with AppleScript
This file contains hidden or 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
#!/usr/bin/env bash | |
# SOURCE: https://gist.github.com/Koze/2e1a9bf967b2bf865fc9 | |
# close all windows (e.g., thousands of finder windows from unarchiver) | |
osascript -e 'tell application "Finder" to close windows' | |
## index 1 is frontmost window | |
# osascript 'tell application "Finder" to close window 1' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment