Skip to content

Instantly share code, notes, and snippets.

@mayoff mayoff/
Created Jun 20, 2017

What would you like to do?
Services menu item to toggle Finder's desktop icons
if [[ $(defaults read CreateDesktop 2>/dev/null) = YES ]]; then
defaults write CreateDesktop NO
defaults write CreateDesktop YES
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

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


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.