Skip to content

Instantly share code, notes, and snippets.

@muhammad-shameel-ks
Last active July 15, 2025 15:59
Show Gist options
  • Save muhammad-shameel-ks/27e971c2f51c41b896d99974f7479be9 to your computer and use it in GitHub Desktop.
Save muhammad-shameel-ks/27e971c2f51c41b896d99974f7479be9 to your computer and use it in GitHub Desktop.
My Oh-My-Posh theme
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "shell",
"style": "plain",
"template": "\u256d\ue285"
},
{
"type": "path",
"style": "plain",
"properties": {
"style": "folder"
},
"template": "{{ if eq .Path \"~\" }} \ue617 {{ else }} \uf07b {{ .Path }} {{ end }}"
},
{
"type": "session",
"style": "plain",
"template": "{{ if .Root }} <#0066FF>\udb85\udc0b</>{{ end }}"
}
]
},
{
"type": "prompt",
"alignment": "right",
"segments": [
{
"type": "command",
"style": "plain",
"properties": {
"command": "if [ -d .git ] || git rev-parse --git-dir > /dev/null 2>&1; then git_info=' <#F05032>\ue725</> '$(git branch --show-current 2>/dev/null || echo 'HEAD')' '; else git_info=''; fi; if [ -f package.json ]; then if [ -f tsconfig.json ]; then echo \"$git_info<#61DAFB>\udb81\udf08</> / <#007ACC>\ue69d</>\"; else echo \"$git_info<#61DAFB>\udb81\udf08</> / <#F7DF1E>\uf2ef</>\"; fi; elif [ -f pubspec.yaml ]; then echo \"$git_info<#027DFD>\ue7dd</>\"; else echo \"$git_info\uf444\"; fi",
"shell": "bash"
},
"template": "{{.Output}} "
},
{
"type": "command",
"style": "plain",
"properties": {
"command": "$git_info = ''; if (Test-Path .git) { $branch = git branch --show-current 2>$null; if (-not $branch) { $branch = 'HEAD' }; $git_info = ' <#F05032>\ue725</> ' + $branch + ' \udb81\udc43 ' }; if (Test-Path package.json) { if (Test-Path tsconfig.json) { $git_info + '<#61DAFB>\udb81\udf08</> / <#007ACC>\ue69d</>' } else { $git_info + '<#61DAFB>\udb81\udf08</> / <#F7DF1E>\uf2ef</>' } } elseif (Test-Path pubspec.yaml) { $git_info + '<#027DFD>\ue7dd</>' } else { $git_info + '\uf444' }",
"shell": "pwsh"
},
"template": "{{.Output}} "
},
{
"type": "command",
"style": "plain",
"properties": {
"command": "set git_info= & if exist .git\\nul (for /f \"tokens=*\" %%i in ('git branch --show-current 2^>nul') do set branch=%%i & if not defined branch set branch=HEAD & set git_info= ^<#F05032^>^&^#xe725^;^</^> !branch! ^&^#xdb81^;^&^#xdc43^; ) & if exist package.json (if exist tsconfig.json (echo !git_info!^<#61DAFB^>^&^#xdb81^;^&^#xdf08^;^</^>^ /^ ^<#007ACC^>^&^#xe69d^;^</^>) else (echo !git_info!^<#61DAFB^>^&^#xdb81^;^&^#xdf08^;^</^>^ /^ ^<#F7DF1E^>^&^#xf2ef^;^</^>)) else if exist pubspec.yaml (echo !git_info!^<#027DFD^>^&^#xe7dd^;^</^>) else (echo !git_info!^&^#xf444^;)",
"shell": "cmd"
},
"template": "{{.Output}} "
},
{
"type": "executiontime",
"style": "plain",
"properties": {
"threshold": 3000
},
"template": "\ueba2 {{ .FormattedMs }}\u2800"
}
]
},
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "text",
"style": "plain",
"foreground": "#00d4ff",
"template": "\u2570\u2500"
},
{
"type": "status",
"style": "plain",
"properties": {
"always_enabled": true
},
"template": "{{ if gt .Code 0 }}\uf467{{ else }}\ueab6{{ end }} ",
"foreground": "#d6f4ff",
"foreground_templates": [
"{{ if gt .Code 0 }}#ef5350{{ end }}"
]
}
]
}
],
"version": 3
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment