Mac隐藏/显示桌面图标

date
Aug 25, 2016
slug
mac-False-Desktop-icon
status
Published
tags
mac
summary
type
Post

Shell:

defaults write com.apple.finder CreateDesktop -bool FALSE;killall Finder
&
defaults delete com.apple.finder CreateDesktop;killall Finder

AppleScript:

display dialog "桌面图标设置为可见或隐藏?" buttons {"可见", "隐藏"}with icon 2with title "Switch to presentation mode" default button 1
set switchto button returnedofresult
if switchis "隐藏"then
        do shell script "defaults write com.apple.finder CreateDesktop -bool FALSE;killall Finder"
else
        do shell script "defaults delete com.apple.finder CreateDesktop;killall Finder"
endif
 

© Hivan Du 2021