13

I spent quite some time in Windows Terminal to set up my preferences and color themes. What's a good way to port / sync these settings to other computers?

I guess there are 3 tiers of solutions:

Level 1: Know I'm about to buy a new computer or reinstall Windows, thinking how to port my settings.

Level 2: No plan to change computers for now, but want to ensure I won't lose my settings if case of disaster.

Level 3: Have multiple computers and want the settings to be in sync, e.g. if I change a setting on one computer, the other computer will get it automatically.

All suggestions are welcome, no matter which level!

ZYinMD
  • 517

2 Answers2

13

Open Settings, click the "Open JSON file" on the bottom left corner, then copy the json content to somewhere else as a backup. On your new computer, paste it back to restore your settings.

Whenever you make an important change to your settings, remember to update the backup.


↓ not recommended ↓

You can also use a symlink to make settings.json point to a file in your OneDrive. If set correctly, it may have 2 benefits:

  1. When you make a change to the settings, it's auto saved in OneDrive, so you don't need to remember to backup manually.
  2. If you have multiple PCs, their settings can be auto mirrored, assuming they all installed the same shells and all shells are installed at the same path. (can be seen in Settings > Profiles > any_profile > Command line)

Why not recommended:

Windows Terminal may sometimes decide to update settings.json in a "delete-and-recreate-with-updated-content" fashion, which breaks the link without you knowing it.

You may be able to solve this by symlinking the parent folder as opposed to the file itself, but there are some other files in the parent folder that are truly local, which shouldn't be synced.

ZYinMD
  • 517
1

you can also use https://www.chezmoi.io/ for monitoring your files across multiple devices. It uses Git and tracks the changes for you. However, you might need to check regularly if changes occur. (while OneDrive can do it automatically).

LBF38
  • 11