Skip to content

Instantly share code, notes, and snippets.

@margani
Last active June 7, 2024 07:50
Show Gist options
  • Save margani/86d2ce6d9b9f587c6b72faab906dfb38 to your computer and use it in GitHub Desktop.
Save margani/86d2ce6d9b9f587c6b72faab906dfb38 to your computer and use it in GitHub Desktop.
My PowerShell Oh My Posh Theme based on amro.omp.json theme
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"type": "session",
"style": "plain",
"foreground": "#45F1C2",
"template": "\ueb99 {{ lower .UserName }} on"
},
{
"type": "path",
"style": "plain",
"foreground": "#0CA0D8",
"properties": {
"folder_separator_icon": "/",
"style": "full"
},
"template": " \uf07b {{ .Path }} "
},
{
"type": "git",
"style": "plain",
"foreground": "#14A5AE",
"powerline_symbol": "\ue0b0",
"properties": {
"fetch_stash_count": true,
"fetch_upstream_icon": true
},
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }} "
},
{
"type": "executiontime",
"style": "plain",
"foreground": "#8800dd",
"template": "⏳️{{ .FormattedMs }}",
"properties": {
"threshold": 500,
"style": "austin",
"always_enabled": true
}
}
],
"type": "prompt"
},
{
"alignment": "right",
"newline": false,
"segments": [
{
"type": "kubectl",
"style": "plain",
"foreground": "#ebcc34",
"template": "[K8S:{{.Context}}{{if .Namespace}}:{{.Namespace}}{{end}}]"
},
{
"type": "az",
"style": "plain",
"foreground": "#9ec3f0",
"template": "[AZ:{{ .Name }}:{{ substr 0 4 .ID }} in {{ substr 0 4 .HomeTenantID }}]"
},
{
"type": "status",
"style": "diamond",
"foreground": "#ffffff",
"background": "#00897b",
"background_templates": [
"{{ if .Error }}#e91e63{{ end }}"
],
"template": "  ",
"properties": {
"always_enabled": true
}
},
{
"type": "time",
"style": "plain",
"foreground": "#007ACC",
"properties": {
"time_format": "15:04:05"
}
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#ff0000",
"style": "plain",
"template": "\u0021",
"type": "root"
},
{
"type": "text",
"style": "plain",
"foreground": "#a63535",
"template": "# "
}
],
"type": "prompt"
}
],
"version": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment