Omicron Software Systems
Home · About · Contact · Products

 

ToDo X: Accessing Hidden Preferences via the Terminal

 

ToDo X has a number of “hidden” preferences; that is, preferences that cannot be viewed or changed from within the application itself. For these you must resort to using the macOS “Terminal” application. Fear not: just follow these instructions carefully and meticulously. Use copy-and-paste where possible.

Each individual Terminal command shown below should be entered on one line, even if your web browser has split it across lines for some reason. After entering a command, double-check it to ensure that every space, quote or minus sign is exactly as it should be; then press the return key to perform the command. Upper and lower case are significant!

In “com.nomicro.ToDo” there are two periods, five instances of the lower-case letter o, two capital letters, and no spaces.
 
Viewing a Hidden Preference

If you want to just view the value of a hidden preference, it doesn’t matter whether ToDo X is running or not. Simply launch the Terminal application (from the /Applications/Utilities folder) and type a command such as the following, then press the return key:

defaults read com.nomicro.ToDo PrefName

For PrefName, substitute the name of the preference you’re interested in. These names are all documented in the FAQ.

You might get a somewhat cryptic message telling you that the preference does not exist, even though you’re sure that you typed the name correctly. This simply means that the preference has never been changed from its default (normal) value, or has been deleted and thus reverted to its default value.
 
Setting a Hidden Preference

If you want to change the value of a hidden preference, you should first make sure that ToDo X is not currently running. If it is, quit it before proceeding. Also, you might want to make sure that you have a backup of your preferences file. Refer to the application’s Help menu for information about that.

With ToDo X not running, launch the Terminal application (from the /Applications/Utilities folder) and type a command such as the following, then press the return key:

defaults write com.nomicro.ToDo PrefName Type Value

For PrefName, substitute the name of the preference whose value you want to change. These names are all documented in the FAQ.

For Type, substitute the type of that particular preference value as indicated in the FAQ; you will enter "-float" for a decimal number preference, "-integer" for an integer number preference, "-boolean" for a Yes/No preference, or "-string" for a character string preference. Note the minus sign!

For Value, substitute the new preference value that you want to set. This will be something like 12.34 for a float preference, 56 for an integer preference, Yes or No for a boolean preference, or "some string of characters" for a string preference. A string preference should be enclosed in (conventional, non-curly) single or double quotes.

The FAQ provides an example for each hidden preference, showing exactly what you would enter to set the preference to its normal value. Just copy and paste the command as shown, substituting the new value. Here are a couple of the examples:

defaults write com.nomicro.ToDo SearchTime -float 1.5
defaults write com.nomicro.ToDo StampFormat -string '%Y-%m-%d %H:%M - '

When you’re done, you can quit the Terminal application and re-launch ToDo X.
 
Resetting a Hidden Preference

To change a preference back to its default (normal) value, you can use the appropriate “defaults write” command as described above, but it is simpler to just delete the preference value as shown here:

defaults delete com.nomicro.ToDo PrefName

For PrefName, substitute the name of the preference you want to reset. These names are all documented in the FAQ.

Deleting that preference will cause ToDo X to use its built-in default value when next launched. Again, make sure that ToDo X is not running when you are setting or resetting preference values via the Terminal. Observe all cautions noted above.
 
Resetting ToDo X

As a drastic measure you can remove the application’s preference file entirely. Make sure that ToDo X is not running, then enter the following Terminal command:

defaults delete com.nomicro.ToDo

The next time you launch ToDo X it will be as if it were the first. All of your ToDo X data will have been lost, all of the built-in preferences will have reverted to their default values, and everything that the system itself saves in the preference file (such as the application’s window sizes and positions) will have been forgotten. The only way to recover from this action is to restore from a backup as described below. Therefore, never delete your preference file unless you are sure that you have a good backup copy.
 
Restoring from Backup

If you have a Time Machine (or other) backup of your full ToDo X preference file you can restore it as described here. Note that this will revert all of your ToDo X data, as well as the application’s built-in preferences and associated system preferences, to their state as of the backup. Therefore (and especially if you have an automatic or manual data backup rather than a full preference file backup) you should always prefer to Import from Backup as described in the next section.

If you want to restore rather than import, first make sure that ToDo X is not running. Then open your Preferences folder using the following Terminal command. Note the tilde character, which stands for your home folder.

open ~/Library/Preferences

Locate the existing preference file com.nomicro.ToDo.plist within the Preferences folder and replace it with your backup copy. (Note that the plist suffix may not be visible, depending on your Finder settings.) After doing so, enter the following command, which will prod the system to recognize the restored preferences:

defaults read com.nomicro.ToDo >/dev/null

This prevents the system from using any old, cached preference values that it may have squirreled away in memory for performance reasons. The next time you launch ToDo X its data and preferences should be back to the way they were at the time of the backup.
 
Importing from Backup

Whether you have an automatic or manual data backup, or a full copy of your preferences file, if you just want to retrieve the Categories and Things To Do data you need not resort to restoring from backup as described above. Instead, from within ToDo X itself you can choose Import... from the File menu and import from the backup copy. This will add to, rather than replace, any existing data. Preferences will not be affected.