Macのデスクトップアイコンを一時的に非表示にする方法

Macのデスクトップアイコンを非表示にするアプリを自作してみました。
意外と簡単です。
コピペでできるので、ぜひ試してみてください。
スクリプトエディタでコーディング
Launchpadからスクリプトエディタを検索して立ち上げます。

新規作成で、下記のコードをコピペします。
set userChoice to display dialog "デスクトップアイコンを表示しますか、非表示にしますか?" buttons {"表示", "非表示"} default button 1
set choice to button returned of userChoice
if choice is "表示" then
do shell script "defaults write com.apple.finder CreateDesktop -boolean true"
do shell script "killall Finder"
display notification "デスクトップアイコンが表示されます。"
else if choice is "非表示" then
do shell script "defaults write com.apple.finder CreateDesktop -boolean false"
do shell script "killall Finder"
display notification "デスクトップアイコンが非表示になります。"
end if
メニューからファイル→書き出すを選択。
ファイルフォーマットにアプリケーションを選択して保存します。

実行結果
作成したアプリのアイコンをダブルクリックすると「表示」、「非表示」の選択肢が表示され、切り替えることができます。
