Table of Contents [hide]
Overview
Recently I moved from a Macbook Air to a windows machine and the thing I missed most was the git info in the terminal. Everything was so simple an sufficient with Oh My Zsh.
After spent some time, I found the perfect theme (https://github.com/AntonRyadovoy/Powershell-nord-theme/blob/main/nordcustom_v.3.yaml with a little tweak).
Setup
I believe that you already setup oh my posh.
Let’s go to the theme folder and create the theme file:
PowerShell
x
1
1
cd $env:POSH_THEMES_PATH
Use any editor you want to put the following content
YAML
1
82
82
1
# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
2
3
palette
4
nord-0'#2E3440'
5
nord-1'#3B4252'
6
nord-2'#434C5E'
7
nord-3'#4C566A'
8
nord-4'#D8DEE9'
9
nord-5'#E5E9F0'
10
nord-6'#ECEFF4'
11
nord-7'#8FBCBB'
12
nord-8'#88C0D0'
13
nord-9'#81A1C1'
14
nord-10'#5E81AC'
15
nord-11'#BF616A'
16
nord-12'#D08770'
17
nord-13'#EBCB8B'
18
nord-14'#A3BE8C'
19
nord-15'#B48EAD'
20
blocks
21
type prompt
22
alignment left
23
segments
24
properties
25
cache_duration none
26
template" ╭─<#BF616A>[<#88C0D0>\U000F0536</> </>{{ if .SSHSession }} {{ end }}{{ .UserName }}@{{ .HostName }}<#BF616A>]</> "
27
foreground p nord-13
28
type session
29
style plain
30
properties
31
cache_duration none
32
playing_icon"\U000F04C7 "
33
template'{{ .Icon }}{{ if ne .Status "stopped" }}{{ .Artist }} - {{ .Track }}{{ end }}'
34
foreground p nord-14
35
type spotify
36
style plain
37
properties
38
cache_duration none
39
folder_icon
40
folder_separator_icon' / '
41
home_icon"\U000F02DC"
42
max_depth2
43
style agnoster_short
44
foreground p nord-15
45
type path
46
style plain
47
properties
48
always_enabledtrue
49
cache_duration none
50
template" {{ if gt .Code 0 }}✘ {{ else }}\U000F0E1E {{ end }}{{ if eq ( gt .Code 0 ) .Segments.Path.Writable}} {{ end }}"
51
foreground p nord-14
52
type status
53
style plain
54
foreground_templates
55
'{{ if gt .Code 0 }}red{{ end }}'
56
type prompt
57
alignment left
58
segments
59
properties
60
branch_icon' '
61
cache_duration none
62
fetch_stash_counttrue
63
fetch_statustrue
64
fetch_upstream_icontrue
65
fetch_worktree_counttrue
66
template"{{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \U000F0193 {{ .StashCount }}{{ end }}"
67
foreground p nord-13
68
type git
69
style plain
70
type prompt
71
alignment left
72
segments
73
properties
74
cache_duration none
75
template" <#EBCB8B>╰─ "
76
foreground p nord-8
77
type text
78
style plain
79
newlinetrue
80
version3
81
82
edit your profile to load the theme
PowerShell
1
1
1
notepad $PROFILE
And put this line at the top to load the correct profile:
PowerShell
1
1
1
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/nordcustom_v.3.yaml" | Invoke-Expression notepad $PROFILE
That’s it!
Result

This is exactly what I need.

I build softwares that solve problems. I also love writing/documenting things I learn/want to learn.