隐藏:
defaults write com.apple.finder CreateDesktop -bool false;killall Finder;say icons hidden
恢复显示:
defaults write com.apple.finder CreateDesktop -bool true;killall Finder;say icons show
上面的操作甚至可以制作成为一个Applescript,然后变成一个应用程序:
- 用脚本编辑器打开后添加如下代码:
display dialog "Desktop icons visible or hidden?" buttons {"Visible", "Hidden"} with icon 2 with title "Switch to presentation mode" default button 1
set switch to button returned of result
if switch is "Hidden" 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"
end if
- 点击“File”—> export to 在弹出的对话框中保存为application类型,默认会保存为脚本,注意修改下。
- 将该App拖入Applications目录即可。