May 2, 2026
When you are presenting at a conference, the last thing you want to show is your messy desktop. Files everywhere. Maybe some revealing. I use this little shell script on MacOS to hide all the files on the desktop. Run it againt to bring them back. Also good for recording videos.
#!/bin/bash
file="present.txt"
if [ -f "$file" ]
then
rm $file
defaults write com.apple.finder CreateDesktop true
killall Finder
else
echo "You got this." > $file
defaults write com.apple.finder CreateDesktop false
killall Finder
fi
~/present.sh
Back to Notes