Created
July 18, 2022 12:04
-
-
Save erikgaal/6a3afd89fbba2b8d64674baba9f6bf6a to your computer and use it in GitHub Desktop.
Small utility to find keys for preferences on macOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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