microsoft / microsoft/terminal
`settings.json` gets regenerated after it is deleted while Windows Terminal is running
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
# Description of the new feature/enhancement
I store most of my configs in git, I link them with [dploy](https://github.com/arecarn/dploy) tool, but, there is a problem with Windows Terminal behavior, on windows 11 windows terminal is set as default terminal application, this means all powershell script that I will run from explorer context menu will spawn windows terminal, the problem with windows terminal started is that to link my `settings.json` config file (for windows terminal) I need to first delete it from `$HOME\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState` folder, but, when windows terminal is running it will almost immediately will write `settings.json` to disk even thought you are not changing any settings at this moment, this breaks `dploy` linking as `settings.json` file is present.
As a workaround l link this config with `New-Item -ItemType SymbolicLink` as it's fast enough to create link before this config is written to disk:
```
Remove-Item -Path $env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
New-Item -ItemType SymbolicLink -Path $env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json -Target $HOME\git\dotfiles_windows\dotfiles\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
```
# Proposed technical implementation details (optional)
Contributor guide
Research direction
Start by reproducing the behavior with $HOME\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json while Windows Terminal is running, using the deletion and symbolic-link commands in the issue. Trace the settings file lifecycle and verify that a linked settings.json is not replaced or regenerated during normal startup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100