@@ -612,6 +612,9 @@ Begin
612
612
{
613
613
[CmdletBinding (HelpURI = ' manualcmd' )] param ()
614
614
615
+ $appName = ' Microsoft.WindowsTerminal'
616
+ $appKey = ' 8wekyb3d8bbwe'
617
+
615
618
$parentId = (gwmi win32_process - Filter " processid='$pid '" ).parentprocessid
616
619
if ((gwmi win32_process - Filter " processid='$parentId '" ).Name -eq ' WindowsTerminal.exe' )
617
620
{
@@ -621,9 +624,9 @@ Begin
621
624
622
625
Chocolatize ' microsoft-windows-terminal'
623
626
624
- # customize settings... for Terminal v1 .8.1444.0
627
+ # customize settings... for Terminal 1 .8.1444.0, 1.9.1942 .0
625
628
626
- $0 = " $ ( $env: LOCALAPPDATA ) \Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe \LocalState\settings.json"
629
+ $0 = " $ ( $env: LOCALAPPDATA ) \Packages\$appName `_ $appKey \LocalState\settings.json"
627
630
if (! (Test-Path $0 ))
628
631
{
629
632
# when Terminal is first installed, no settings file exists so download default
@@ -637,6 +640,7 @@ Begin
637
640
638
641
$settings.initialCols = 160
639
642
$settings.initialRows = 90
643
+ $settings.initialPosition = ' 200,25'
640
644
641
645
$scheme = New-Object - TypeName PsObject - Property @ {
642
646
background = ' #080808'
@@ -704,8 +708,13 @@ Begin
704
708
# object properties to key/value collections
705
709
ConvertTo-Json $settings - Depth 100 | Out-File $0 - Encoding Utf8
706
710
711
+ # Create shortcut to pin to taskbar
712
+ $version = (choco list - l - r - e microsoft- windows- terminal).Split(' |' )[1 ]
713
+ New-RunasShortcut C:\Tools\wt.lnk " $ ( $env: ProgramFiles ) \WindowsApps\$appName `_$version `_x64__$appKey \wt.exe"
714
+
707
715
$reminder = ' Windows Terminal' , `
708
- ' 0. initialPosition can be set globally in settings.json ("x,y" value)'
716
+ " 0. Pin C:\Tools\wt.lnk to Taskbar" , `
717
+ ' 1. initialPosition can be set globally in settings.json ("x,y" value)'
709
718
710
719
$script :reminders += , $reminder
711
720
Highlight $reminder ' Cyan'
0 commit comments