Setting System/App parameters from terminal
Way too long question, I know :-( Sorry
I often completely erase my computer and do a Clean Install. But there is a lot of setting I like to redo, and I’d like to do a part of it in a bash script that I would run on fresh install.
I need help on two thing
1- Writing parameters inside parameter (sorry for my English)
When the parameter is in the first level, I can do it
Example
defaults write com.apple.Terminal "Default Window Settings" Homebrew
defaults write com.apple.Terminal "Startup Window Settings" Homebrew
But when it is not on the first level, I don’t know how to do
Example
if I wanted to create a new entry in NSUserDictionaryReplacementItems
(Might be a bad example because those comeback even on clean install but it is just to illustrated)
Question 1
how to write those multi level parameter
2- Looking for parameter
To find which parameter to change in a preferences files
I change a parameter in the preference of the App I need to configure
then I look into my ~/Library/Prerefences to see which file has changed
But something, I don’t see which file has been changed
Example
system Preference -> General -> Use Dark menu bar and dock
When I toggle it, I don’t see which preference file is being used
so in terminal, I tried
grep -r 'mode' ./
I tried with many different word, and could not find it
Question 2
any suggestions on how to search :-)
Thank you