How do I temporarily hide desktop icons on a MacBook Air?

how do i temporarily hide desktop icons?



[Re-Titled by Moderator]



MacBook Air 13″, macOS 14.7

Posted on May 31, 2025 02:19 AM

Reply
4 replies

May 31, 2025 05:41 AM in response to pheidrich

Use this AppleScript which toggles the Desktop icons to shown or hidden:


use scripting additions

tell application "SystemUIServer"
	activate
	
	set userCanceled to false
	set myReturn to ""
	
	try
		set dialogResult to button returned of (display dialog ¬
			"OS X Desktop Appearance" buttons {"Cancel", "Clear Icons", "Normal"} ¬
			default button 2 with icon note)
		
	on error number -128
		set userCanceled to true
		return
	end try
end tell

if dialogResult is "Normal" then
	(do shell script "defaults write com.apple.finder CreateDesktop -bool true && killall Finder")
else if dialogResult is "Clear Icons" then
	(do shell script "defaults write com.apple.finder CreateDesktop -bool false && killall Finder")
end if
return




This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How do I temporarily hide desktop icons on a MacBook Air?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.