Created
July 23, 2020 19:20
-
-
Save patrickhpan/d3d4ee7f6e4a4c3449c1aa27d316d02b to your computer and use it in GitHub Desktop.
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
| yabai -m query --spaces | jq 'reverse | .[] | select(.windows | length == 0).index' | while read id; do yabai -m space $id --destroy; done |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I set this up as an every-15-minute crontab. You might need to append the install path for
yabaiandjq(perhaps/usr/local/bin?) to your$PATHin this script to make surecronhas access.