2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Mac OS Xでデスクトップのアイコンの表示・非表示を切り替えるスクリプト

Last updated at Posted at 2013-01-31

実行すると一時的にデスクトップの全アイコンを消すことができる。もう一度実行すると元に戻る。プレゼンテーションを行うときなどに便利。

cleardesk.sh
# !/bin/sh

ICON_STATUS=`defaults read com.apple.finder CreateDesktop`
if [ $ICON_STATUS -eq 0 ]
then
	NEW_STATUS=true
	echo デスクトップのアイコンを表示します。
else
	NEW_STATUS=false
	echo デスクトップのアイコンを非表示にします。
fi

defaults write com.apple.finder CreateDesktop -boolean $NEW_STATUS
killall Finder

動作確認はMac OS X 10.8で行った。

参考

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?