terminal
terminal copied to clipboard
`settings.json` gets regenerated after it is deleted while Windows Terminal is running
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