Skip to content

Instantly share code, notes, and snippets.

@reishoku
Created February 20, 2021 08:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reishoku/3932d4d80ffaefebcb0d22cf2b0feeb9 to your computer and use it in GitHub Desktop.
Save reishoku/3932d4d80ffaefebcb0d22cf2b0feeb9 to your computer and use it in GitHub Desktop.
#!/usr/bin/env zsh
# Note that '追加' means 'add'. Localized word should be entered there.
# worked in macOS Big Sur 11.2.1 & MacBookPro 2016
open -a Mission\ Control && osascript -e ''tell application "System Events" to click (every button whose value of attribute "AXDescription" contains "追加") of group 2 of group 1 of group 1 of process "Dock"''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment