Skip to content

Commit d876354

Browse files
committed
Publish Comply theme
1 parent f126cbe commit d876354

File tree

5 files changed

+124
-0
lines changed

5 files changed

+124
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Comply Theme for Oh My Posh
2+
3+
Comply is a simple Oh My Posh theme for users who only want essential information in their prompt.
4+
5+
![A preview of the Comply theme for Oh My Posh](comply.png)
6+
7+
## Features
8+
9+
- A user glyph (👤) that changes color from cyan to orange when running as root/admin.
10+
11+
- A segment that shows the execution time of the last command. It automatically formats the time as milliseconds, seconds, minutes, or hours (etc) when relevant.
12+
13+
- The current path displayed after a folder glyph (📁). When in your home folder's path, the standard ~ character takes its place to reduce length and provide some privacy when sharing screenshots (eg: "C:\Users\JaneDoe\Downloads" becomes "~\Downloads").
14+
15+
- The prompt character appears by itself on a new line, which makes the command history easier to read.
16+
- The prompt character changes from a white `>` to an orange `#` when running as admin/root, which should familiar to users who run `sudo` or `enable`.
17+
18+
- A transient prompt: the full prompt is rendered only for the current command. All previously executed command lines have a simplified `>>` prompt in yellow to reduce clutter and improve readability.
19+
20+
## Screen Shots
21+
22+
### Comply theme running as a standard user
23+
24+
![Sample screen shot running as standard user.](comply-example-standard-user.png)
25+
26+
### Comply theme running as an elevated admin/root user
27+
28+
![Sample screen shot running as a privileged user.](comply-example-admin-user.png)
29+
30+
## Getting Started
31+
32+
To use the Comply theme, download '[comply.omp.json](comply.omp.json)' and add it to your PowerShell profile.
33+
34+
For more information, visit [ohmyposh.dev](https://ohmyposh.dev).
81.5 KB
Loading
60 KB
Loading
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
3+
"version": 3,
4+
"palettes": {
5+
"template": "{{ if .Root }}admin{{ else }}user{{ end }}",
6+
"list": {
7+
"admin": {
8+
"promptColor": "#ffffff",
9+
"userColor": "#ff6200",
10+
"executionTimeColor": "lightYellow"
11+
},
12+
"user": {
13+
"promptColor": "#0CA0D8",
14+
"userColor": "#45F1C2",
15+
"executionTimeColor": "lightYellow"
16+
}
17+
}
18+
},
19+
"blocks": [
20+
{
21+
"type": "prompt",
22+
"alignment": "left",
23+
"segments": [
24+
{
25+
"type": "session",
26+
"template": "\ueb99 ",
27+
"style": "plain",
28+
"foreground": "p:userColor"
29+
},
30+
{
31+
"type": "executiontime",
32+
"template": "  {{ .FormattedMs }} ",
33+
"style": "plain",
34+
"foreground": "p:executionTimeColor",
35+
"properties": {
36+
"threshold": 500,
37+
"style": "round",
38+
"always_enabled": true
39+
}
40+
},
41+
{
42+
"type": "path",
43+
"template": "\uf07b {{ .Path }} ",
44+
"style": "plain",
45+
"foreground": "#0CA0D8",
46+
"properties": {
47+
"cache_duration": "none",
48+
"folder_separator_icon": "/",
49+
"style": "full"
50+
}
51+
},
52+
{
53+
"type": "git",
54+
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }} ",
55+
"style": "plain",
56+
"powerline_symbol": "\ue0b0",
57+
"foreground": "#ffffff",
58+
"properties": {
59+
"cache_duration": "none",
60+
"fetch_stash_count": true,
61+
"fetch_upstream_icon": true
62+
}
63+
}
64+
]
65+
},
66+
{
67+
"type": "prompt",
68+
"alignment": "left",
69+
"newline": true,
70+
"segments": [
71+
{
72+
"template": "{{if .Root}}# {{ else }}> {{ end }}",
73+
"type": "root",
74+
"style": "plain",
75+
"foreground": "p:promptColor"
76+
},
77+
{
78+
"type": "text",
79+
"template": "{{if .Root}}{{ else }}> {{ end }}",
80+
"style": "plain",
81+
"foreground": "p:promptColor"
82+
}
83+
]
84+
}
85+
],
86+
"transient_prompt": {
87+
"template": ">> ",
88+
"foreground": "yellow"
89+
}
90+
}
62.1 KB
Loading

0 commit comments

Comments
 (0)