Skip to content

Instantly share code, notes, and snippets.

@erikgaal
Created July 18, 2022 12:04
Show Gist options
  • Save erikgaal/6a3afd89fbba2b8d64674baba9f6bf6a to your computer and use it in GitHub Desktop.
Save erikgaal/6a3afd89fbba2b8d64674baba9f6bf6a to your computer and use it in GitHub Desktop.
Small utility to find keys for preferences on macOS
#!/usr/bin/env bash
app_name=$1
tmp_before=$(mktemp)
defaults read $app_name > $tmp_before
printf "%s" "Make the changes in the app now."
printf "\n%s" "Press any key to continue."
# Wait for user input.
read ans
tmp_after=$(mktemp)
defaults read $app_name > $tmp_after
diff $tmp_before $tmp_after
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment