unixorn/tumult.plugin.zsh

View on GitHub
bin/hide-desktop-icons

Summary

Maintainability
Test Coverage
#!/usr/bin/env bash
#
# Hide desktop icons in Finder
#
# Copyright 2021, Joe Block <jpb@unixorn.net>
# License: Apache 2

set -o pipefail

if [[ -n "$DEBUG" ]]; then
  set -x
fi

if [[ "$(uname -s)" != 'Darwin' ]]; then
  echo 'Sorry, this script only works on macOS'
  exit 1
fi

defaults write com.apple.finder CreateDesktop -bool false && killall Finder