settings.json gets regenerated after it is deleted while Windows Terminal is running #21880

Open
opened 2026-01-31 07:57:15 +00:00 by claunia · 1 comment
Owner

Originally created by @soredake on GitHub (Jun 20, 2024).

Description of the new feature/enhancement

I store most of my configs in git, I link them with 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)

Originally created by @soredake on GitHub (Jun 20, 2024). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # 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) <!-- A clear and concise description of what you want to happen. -->
claunia added the Area-SettingsIssue-BugPriority-3Product-Terminal labels 2026-01-31 07:57:15 +00:00
Author
Owner

@PankajBhojwani commented on GitHub (Jun 26, 2024):

Thank you for this! Yep we see how that can be annoying

@PankajBhojwani commented on GitHub (Jun 26, 2024): Thank you for this! Yep we see how that can be annoying
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21880