-
-
Save chris-sev/15f9947d7c980ba785a2813feb36e51a to your computer and use it in GitHub Desktop.
Revisions
-
chris-sev revised this gist
May 25, 2021 . No changes.There are no files selected for viewing
-
jldeen created this gist
Oct 15, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ function toggleMenu () { ~/.dotfiles/bin/toggleMenuBigSur.sh } 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ #!/usr/bin/env osascript try if application "System Preferences" is running then do shell script "killall 'System Preferences'" end try repeat until application "System Preferences" is not running delay 0.1 end repeat tell application "System Preferences" reveal anchor "Main" of pane id "com.apple.preference.dock" end tell tell application "System Events" to tell application process "System Preferences" repeat while not (exists of UI element "Automatically hide and show the menu bar" of window "Dock & Menu Bar") delay 0.1 end repeat click UI element "Automatically hide and show the menu bar" of window "Dock & Menu Bar" repeat while not (exists of UI element "Automatically hide and show the menu bar" of window "Dock & Menu Bar") delay 0.1 end repeat end tell try if application "System Preferences" is running then do shell script "killall 'System Preferences'" end try