Skip to content

Instantly share code, notes, and snippets.

@kopiro
Last active May 16, 2022 17:06
Show Gist options
  • Save kopiro/35bc2720f66f0bf566e7d1389dd3c9cc to your computer and use it in GitHub Desktop.
Save kopiro/35bc2720f66f0bf566e7d1389dd3c9cc to your computer and use it in GitHub Desktop.
Get notification when preference from `defaults` change
cmd="defaults read"; left=$(eval $cmd); while true; do right=$(eval $cmd); diff <( printf '%s' "$left") <( printf '%s' "$right"); left="$right"; sleep 1; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment