Created
February 21, 2026 09:29
-
-
Save stephancasas/4645b5f524701060a532e7debd711e4f to your computer and use it in GitHub Desktop.
macOS zsh utility for logging preference keys of a given process
This file contains hidden or 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
| logprefs () { | |
| LOG_PROCESS="${*}" | |
| log stream \ | |
| --level debug \ | |
| --style compact \ | |
| --predicate '((process == "'"$LOG_PROCESS"'") AND (subsystem == "com.apple.defaults") AND (eventMessage contains[cd] "for key")) AND NOT ((eventMessage contains[cd] "AppleLanguages") OR (eventMessage contains[cd] "cursorIsCustomized") OR (eventMessage contains[cd] "AppleReduceDesktopTinting") OR (eventMessage contains[cd] "reduceMotion"))' \ | |
| | perl -ne 'printf "%-70s %-70s\n", $1, $2 if /key (\S+) .*?Domain: ([^,]+)/' | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment