Skip to content

Instantly share code, notes, and snippets.

@mayoff mayoff/step1.sh
Created Jun 20, 2017

Embed
What would you like to do?
Services menu item to toggle Finder's desktop icons
if [[ $(defaults read com.apple.Finder CreateDesktop 2>/dev/null) = YES ]]; then
defaults write com.apple.Finder CreateDesktop NO
else
defaults write com.apple.Finder CreateDesktop YES
fi
if application "Finder" is running then
tell application "Finder" to quit
end if
set waitCount to 0
repeat while application "Finder" is running and (waitCount) < 20
delay 0.1
set waitCount to waitCount + 1
end repeat
tell application "Finder" to launch
@mayoff

This comment has been minimized.

Copy link
Owner Author

mayoff commented Jun 20, 2017

Create a Service document in Automator using the above scripts, like this:

service setup in automator

@carrchr

This comment has been minimized.

Copy link

carrchr commented Jul 7, 2017

Wait. What? So the Desktop becomes blank after you do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.