Created
December 15, 2022 16:15
-
-
Save aarondfrancis/f0671e537b3ff5f2261b3b854d9cac1d to your computer and use it in GitHub Desktop.
This file contains 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/osascript | |
# Required parameters: | |
# @raycast.schemaVersion 1 | |
# @raycast.title Hide Everything | |
# @raycast.mode silent | |
# @raycast.packageName Recording | |
# Optional parameters: | |
# @raycast.needsConfirmation false | |
tell application "System Events" | |
tell dock preferences to set autohide menu bar to true | |
tell dock preferences to set autohide to true | |
do shell script "defaults write com.apple.finder CreateDesktop -bool FALSE;killall Finder" | |
end tell | |
Do you essentially plug it to raycast via script commands?
yes
yes
…On Thu, Dec 15, 2022 at 8:24 AM Guillermo Antony Cava Nuñez < ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
Do you essentially plug it to raycast via script commands
<https://www.raycast.com/blog/getting-started-with-script-commands>?
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/f0671e537b3ff5f2261b3b854d9cac1d#gistcomment-4403845>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4YTQRQPVNQS6UKSV7QIZQ3WNNA2PBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFQKSXMYLMOVS2I5DSOVS2I3TBNVS3W5DIOJSWCZC7OBQXE5DJMNUXAYLOORPWCY3UNF3GS5DZVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVEYTCOJYGU2TGMZQU52HE2LHM5SXFJTDOJSWC5DF>
.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
@gcavanunez yup!
Since your code is only for hiding, you can make it toggle with a single script like this:
tell application "System Events"
tell dock preferences
if ( (autohide of (get properties)) = true and (autohide menu bar of (get properties)) = true ) then
set autohide menu bar to false
set autohide to false
do shell script "defaults write com.apple.finder CreateDesktop -bool TRUE;killall Finder"
else
set autohide menu bar to true
set autohide to true
do shell script "defaults write com.apple.finder CreateDesktop -bool FALSE;killall Finder"
end if
end tell
end tell
@OlivierEstevez oh, that's smart! good idea
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello am interested please message try here google chat oaky
[email protected]