-
Notifications
You must be signed in to change notification settings - Fork 58
/
00-InstallTools.ps1
192 lines (174 loc) · 7 KB
/
00-InstallTools.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
break
#
# InstallTools.ps1
#
# AZE2-ADF-Contoso01
# The easiest way to manage tools on Windows is with WinGet
# Download the latest version then execute the install from PowerShell
https://github.com/microsoft/winget-cli/releases
# Side load the app or else you can find it in the Microsoft Store on Windows 10
# E.g.
Add-AppxPackage -Path $home\Downloads\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle
winget install "Git Credential Manager Core"
winget install Microsoft.PowerShell
winget install Microsoft.VisualStudioCodeInsiders
winget install Microsoft.VisualStudioCode
winget install Microsoft.WindowsTerminalPreview
winget install GitHub.cli
winget install Microsoft.AzureStorageExplorer
# install a suitable NerdFont on your system, them configure it within vscode and Terminal etc.
# you can download here
#https://www.nerdfonts.com/font-downloads
<# example of vscode setting
"editor.fontFamily": "FiraCode Nerd Font",
"editor.fontLigatures": true,
#>
<# example of Terminal setting
"profiles": {
"defaults": {
"backgroundImageOpacity": 0.10000000000000001,
"experimental.retroTerminalEffect": false,
"fontFace": "FiraCode Nerd Font",
"fontSize": 12,
"useAcrylic": false
},
#>
Install-Module -Name posh-git, Terminal-Icons, oh-my-posh
<# I add this to my personal powershell profile
Import-Module oh-my-posh
Import-Module posh-git
Import-Module Terminal-Icons
#>
<# Example of a oh-my-posh theme saved to $home\my-oh-my-posh.json
# https://ohmyposh.dev/ <-- more info on customizing the prompt
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"version": 1,
"final_space": true,
"transient_prompt": {
"background": "transparent",
"foreground": "#ffffff",
"template": "{{ .Shell }}> "
},
"blocks": [
{
"type": "prompt",
"segments": [
{
"type": "os",
"style": "plain",
"properties": {
"windows": " ",
"template": "{{ if .WSL }}wsl {{ end }}{{.Icon}}"
},
"foreground": "#26C6DA",
"background": "#070707"
},
{
"type": "shell",
"style": "powerline",
"properties": {
"template": " ﲵ {{ .Name }} "
},
"powerline_symbol": "",
"foreground": "#ffffff",
"background": "#0077c2"
},
{
"type": "time",
"style": "plain",
"properties": {
"time_format": "15:04:05",
"template": "[{{ .CurrentDate | date .Format }}]"
},
"foreground": "#E5C07B"
},
{
"type": "root",
"style": "plain",
"properties": {
"template": " "
},
"foreground": "#B5B50D"
},
{
"type": "text",
"style": "plain",
"properties": {
"template": "{{ .Env.AZAccount }}"
},
"powerline_symbol": "",
"foreground": "#474646",
"background": "#e6c868"
},
{
"type": "path",
"style": "plain",
"properties": {
"template": " {{ .Path }} ",
"style": "agnoster"
},
"foreground": "#61AFEF"
},
{
"type": "git",
"style": "plain",
"powerline_symbol": "\uE0B0",
"foreground": "#e6c868",
// "background": "#200f3b",
"background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}#200f3b{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#8462bb{{ end }}",
"{{ if gt .Ahead 0 }}#483468{{ end }}",
"{{ if gt .Behind 0 }}#261a3a{{ end }}"
],
"properties": {
"fetch_status": true,
"fetch_stash_count": true,
"fetch_upstream_icon": true,
"template": "{{ .UpstreamIcon }} {{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
}
},
// {
// "type": "git",
// "style": "plain",
// "properties": {
// "template": " {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} {{ .WorktreeCount }}{{ end }} ",
// "fetch_status": true,
// "branch_identical_icon": "",
// "branch_gone_icon": "🟧"
// },
// "foreground": "#F3C267"
// },
{
"type": "exit",
"style": "plain",
"properties": {
"template": "x{{ if gt .Code 0 }} {{ .Meaning }}{{ else }}{{ end }} "
},
"foreground": "#C94A16"
},
{
"type": "text",
"style": "powerline",
"properties": {
"template": "{{ .Env.Enviro }}"
},
"powerline_symbol": "",
"foreground": "#6d1d24",
"background": "#73e600"
},
{
"type": "text",
"style": "plain",
"properties": {
"template": "❯ "
},
"foreground": "#E06C75"
}
],
"alignment": "left"
}
]
}
#>