Skip to content

Instantly share code, notes, and snippets.

@darwin

darwin/readme.md Secret

Last active May 9, 2018 15:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darwin/78432cb9b0f158bc00932bcdaed0b9a8 to your computer and use it in GitHub Desktop.
Save darwin/78432cb9b0f158bc00932bcdaed0b9a8 to your computer and use it in GitHub Desktop.
Reset TotalFinder plists

This is a simple shell script which will hopefully reset TotalFinder and Finder into factory defaults.

Warning: this will wipe out your licensing info.

  1. open /Applications/Utilities/Terminal.app
  2. execute:
curl -sL https://gist.github.com/darwin/78432cb9b0f158bc00932bcdaed0b9a8/raw/totalfinder-reset.sh | bash
  1. if successful you may want to delete backup folder created in ~/.totalfinder-plist-backups via
rm -rf ~/.totalfinder-plist-backups
  1. if something failed, copy&paste the output and send it back to me (support@binaryage.com)
#!/usr/bin/env bash
set -o pipefail
PLIST_BACKUP_FOLDER=~/.totalfinder-plist-backups
if [ -d "$PLIST_BACKUP_FOLDER" ]; then
echo "The backup folder $PLIST_BACKUP_FOLDER already exists from previous run."
echo "Please delete the folder with 'rm -rf $PLIST_BACKUP_FOLDER' before launching this script again."
echo "Doing nothing."
exit 1
fi
# quit Finder and TotalFinderCrashWatcher
osascript -e "tell application \"Finder\" to quit"
killall -SIGINT TotalFinderCrashWatcher
# move plists to backup
mkdir -p $PLIST_BACKUP_FOLDER
if ls ~/Library/Preferences/com.binaryage.totalfinder* 1> /dev/null 2>&1; then
mv -v ~/Library/Preferences/com.binaryage.totalfinder* $PLIST_BACKUP_FOLDER
fi
if ls ~/Library/Preferences/com.apple.finder* 1> /dev/null 2>&1; then
mv -v ~/Library/Preferences/com.apple.finder* $PLIST_BACKUP_FOLDER
fi
# launch TotalFinder again
open /Applications/TotalFinder.app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment