One way to confirm the current keys and values is to dump the app’s settings into a property list using a command likeĭefaults read > ~/Documents/ist Beware that older keys and values may have changed in more recent versions of that app, though. Commonly-used settings are often given in articles and Q&A items on the internet. The latter two aren’t something you can readily guess. If you want to set or change a setting, the value to pass for that key.If you want to set or change a setting, the key for that individual setting.In most cases, if you can’t find out you can specify the name of the app instead of its ID using the option -app AppName, where AppName is the regular app name as shown, without the. For many, this is obvious, or can be checked using a tool such as Taccy. To change preference settings using defaults, there are three bits of information which you need: Because it’s running all the time, cfprefsd is sure to defeat you if you try to do anything direct. The Finder is an excellent example of an app whose preferences should only ever be manipulated using the right tools. Can you find which is the active one? Use defaults and it should save you that trouble and confusion. By the time you’ve migrated across a few Macs and versions of Apple’s Mail app, your Home folder’s Library probably contains several different property list files containing the settings for different versions. There are several other apps which edit general preference settings, those of the Finder and other common apps.Īnother good reason for working with cfprefsd rather than trying to beat it into submission is that it knows where all the preferences files are. If you want a GUI app which has an impeccable track-record, look at Thomas Tempelmann’s free Prefs Editor, which works through the defaults command. So all Apple apps, as far as I’m aware, and the great majority of those from third-parties, should be approached through the two official channels: change their Preferences, or use defaults. For a developer, it’s tempting, but only creates more work. Some apps manage their own preference settings rather than leaving them to cfprefsd. It’s far better instead to work with cfprefsd, using the command tool defaults. The reason that directly manipulating preferences files is so frustratingly unsuccessful now is that macOS manages them using a service, cfprefsd, which will always work against your direct actions. This is because trashing preferences is trying to work against macOS, and more often than not, you’ll come out the loser, having wasted time and got nowhere. Try it now with many apps, particularly the Finder, and it’s doomed to fail. One traditional way of dealing with those is to trash that app’s preferences file, and force it to build a new one. If currentViewer is "" thenĭo shell script "defaults write 5 fileViewer "ĭo shell script "defaults write 5 fileViewer of the time we set an app’s preferences and they just work, but sometimes they lead to all sorts of problems. now switch to whichever fileViewer is currently not in use Set currentViewer to do shell script "defaults read 5 fileViewer" Attaching a script like this to a keyboard shortcut using Peter Lewis’ amazing Keyboard Maestro app makes it super-easy: - set the 'currentViewer' variable to the current fileViewer setting Toggling between Path Finder and Finder on the flyĪnd finally, if you want to get really fancy and sometimes have Default Folder X open folders in the Finder and sometimes in Path Finder, you can set up an AppleScript to toggle back and forth. To tell Default Folder X to go back to using the Finder instead of Path Finder, just replace ‘’ with ‘’. Note that if you’re using the Setapp version of Path Finder, you should replace ‘’ with ‘-setapp’. If you’d rather make this apply only to Default Folder X, you can set Default Folder X’s “fileViewer” preference in Terminal with this command: defaults write 5 fileViewer Using Path Finder instead of the Finder – but just for Default Folder X
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |