Create %USERPROFILE%\\AppData\\Local\\terminal\\wt.reg
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\wt]
@="Windows terminal here"
"Icon"="%USERPROFILE%\\AppData\\Local\\terminal\\wt_32.ico"
[HKEY_CLASSES_ROOT\Directory\Background\shell\wt\command]
@="%LOCALAPPDATA%\\Microsoft\\WindowsApps\\wt.bat"
Create %USERPROFILE%\\AppData\\Local\\terminal\\wt.bat
set WT_STARTING_DIR=%cd%
start %LOCALAPPDATA%\\Microsoft\\WindowsApps\\wt.exe
exit
Windows Terminal - Setting - profiles.json
"profiles":
[
{
"name": "Windows PowerShell",
"startingDirectory": "%WT_STARTING_DIR%", # set starting dir
"fontface": "Cascadia Code" # set font
"background": "#0C0C0C",
"useAcrylic": true,
"acrylicOpacity": 0.75
},
{
"name": "cmd",
"startingDirectory": "%WT_STARTING_DIR%", # set starting dir
"fontface": "Cascadia Code" # set font
}
]
Create/Edit Powershell Profile: %USERPROFILE%\\Documents\\WindowsPowerShell\\Microsoft.PowerShell_profile.ps1
if ([System.Environment]::GetEnvironmentVariable("WT_STARTING_DIR")) {
cd $env:WT_STARTING_DIR
Remove-Item Env:\WT_STARTING_DIR
}