Skip to content

Instantly share code, notes, and snippets.

@KtanPatel
Created August 5, 2024 12:57
Show Gist options
  • Save KtanPatel/d9ef7b308d4b8413da341478d175ebd0 to your computer and use it in GitHub Desktop.
Save KtanPatel/d9ef7b308d4b8413da341478d175ebd0 to your computer and use it in GitHub Desktop.
my oh-my-posh config file - improved kali styled
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"foreground": "blue",
"properties": {
"fetch_version": false,
"fetch_virtual_env": true
},
"style": "plain",
"template": "<{{ if .Root }}lightBlue{{ else }}green{{ end }}>-[</>\ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }}{{ end }}{{ .Full }}{{ end }}<{{ if .Root }}lightBlue{{ else }}green{{ end }}>]</>",
"type": "python"
},
{
"type": "node",
"properties": {
"fetch_version": true,
"fetch_virtual_env": true,
"fetch_package_manager": true
},
"style": "plain",
"foreground": "#6CA35E",
"template": "<{{ if .Root }}lightBlue{{ else }}green{{ end }}>-[</> {{ .Full }} {{ if .PackageManagerIcon }}{{ .PackageManagerIcon}}{{ end }}<{{ if .Root }}lightBlue{{ else }}green{{ end }}>]</>"
},
{
"foreground": "lightWhite",
"properties": {
"folder_separator_icon": "<#c0c0c0>/</>",
"style": "unique"
},
"style": "plain",
"template": "<{{ if .Root }}lightBlue{{ else }}green{{ end }}>-[</>{{ .Path }}<{{ if .Root }}lightBlue{{ else }}green{{ end }}>]</>",
"type": "path"
},
{
"foreground": "white",
"properties": {
"fetch_status": true,
"fetch_upstream_icon": true,
"untracked_modes": {},
"source": "cli",
"mapped_branches": {
"feat/*": "🚀 ",
"bug/*": "🐛 "
}
},
"background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}#FFEB3B{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#FFCC80{{ end }}",
"{{ if gt .Ahead 0 }}#B388FF{{ end }}",
"{{ if gt .Behind 0 }}#B388FB{{ end }}"
],
"style": "plain",
"template": "<{{ if .Root }}lightBlue{{ else }}green{{ end }}>-[</>{{ .UpstreamIcon }} {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }}  {{ .StashCount }}{{ end }}<{{ if .Root }}lightBlue{{ else }}green{{ end }}>]</>",
"type": "git"
}
],
"type": "prompt"
},
{
"alignment": "right",
"segments": [
{
"foreground": "white",
"properties": {
"always_enabled": true,
"style": "round"
},
"style": "plain",
"template": " {{ .FormattedMs }} ",
"type": "executiontime"
},
{
"foreground": "green",
"foreground_templates": ["{{ if gt .Code 0 }}red{{ end }}"],
"properties": {
"always_enabled": true
},
"style": "plain",
"template": " {{ if gt .Code 0 }}\uea76{{else}}\uf42e{{ end }} ",
"type": "status"
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "lightBlue",
"style": "plain",
"template": "<{{ if .Root }}lightBlue{{ else }}green{{ end }}>\u2514\u2500</>{{ if .Root }}<lightRed>#</>{{ else }}${{ end }}",
"type": "text"
}
],
"type": "prompt"
}
],
"version": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment