Skip to content

Instantly share code, notes, and snippets.

@trenthaynes
Created May 16, 2023 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trenthaynes/b12c28957b2ec01d5d91bf5489c91d45 to your computer and use it in GitHub Desktop.
Save trenthaynes/b12c28957b2ec01d5d91bf5489c91d45 to your computer and use it in GitHub Desktop.
oh-my-posh config file
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"console_title_template": "{{.UserName}}@{{.HostName}} {{.Shell}} in {{.PWD}}",
"blocks": [
{
"alignment": "left",
"segments": [
{
"foreground": "cyan",
"style": "powerline",
"template": "{{.UserName}}@{{.HostName}}",
"type": "session"
},
{
"type": "path",
"foreground": "cyan",
"properties": {
"style": "agnoster",
"home_icon": " "
},
"style": "plain",
"template": " {{ .Path }} "
},
{
"type": "git",
"style": "plain",
"foreground": "lightYellow",
"template": "\ue5fb {{ .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 }}  {{ .StashCount }}{{ end }}",
"properties": {
"fetch_status": true,
"fetch_upstream_icon": true,
"fetch_bare_info": true
}
}
],
"type": "prompt"
},
{
"alignment": "right",
"segments": [
{
"foreground": "#1f1155",
"properties": {
"fetch_version": true,
"display_mode": "files"
},
"style": "plain",
"template": "{{ if .Error }}{{ .Error }}{{ else }} \ue77f {{ .Full }}{{ end }}",
"type": "dotnet"
},
{
"foreground": "#68a063",
"properties": {
"display_mode": "files",
"fetch_package_manager": false,
"fetch_version": true
},
"style": "plain",
"template": " \ue718 {{ .Full }}",
"type": "node"
},
{
"foreground": "#68a063",
"properties": {
"fetch_version": true,
"display_mode": "files"
},
"style": "plain",
"type": "npm"
},
{
"foreground": "#FED142",
"properties": {
"display_mode": "context",
"fetch_virtual_env": true,
"display_default": true,
"fetch_version": true
},
"style": "plain",
"template": "{{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }} \ue73c {{ .Full }}{{ end }}",
"type": "python"
},
{
"foreground": "lightGreen",
"style": "plain",
"template": " {{ .CurrentDate | date .Format }} ",
"type": "time"
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "lightGreen",
"foreground_templates": [
"{{ if gt .Code 0 }}red{{ end }}"
],
"properties": {
"always_enabled": true
},
"style": "powerline",
"template": "\u279c ",
"type": "exit"
}
],
"type": "prompt"
}
],
"version": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment