Skip to content

Instantly share code, notes, and snippets.

@mateothegreat
Created September 12, 2025 15:58
Show Gist options
  • Save mateothegreat/93f6d7de397c53d5575abda3446b41f1 to your computer and use it in GitHub Desktop.
Save mateothegreat/93f6d7de397c53d5575abda3446b41f1 to your computer and use it in GitHub Desktop.
# Oh My Posh YAML configuration equivalent of the provided JSONC config.
# This YAML is structured to match the JSONC config as closely as possible.
# For more information on Oh My Posh YAML schema, see:
# https://ohmyposh.dev/docs/config-schema
$schema: "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json"
version: 3
console_title_template: "{{ .Folder }}"
final_space: true
# Transient Prompt Variables Documentation
#
# The transient_prompt template has access to the following variables through {{ . }}:
#
# Core System Information:
# - .UserName: Current username (e.g., "matthewdavis")
# - .HostName: System hostname (e.g., "hater")
# - .Shell: Shell name (e.g., "zsh")
# - .ShellVersion: Shell version (e.g., "5.9")
# - .OS: Operating system (e.g., "darwin")
# - .OSVersion: OS version (e.g., "26.20.1")
# - .Folder: Current folder name (e.g., ".zshrc.d")
# - .PWD: Current working directory path (e.g., "/Users/matthewdavis/.zshrc.d")
#
# Path Information:
# - .Path.Location: Full path location
# - .Path.Path: Formatted path display
# - .Path.RootDir: Boolean indicating if in root directory
# - .Path.Writable: Boolean indicating if directory is writable
# - .Path.StackCount: Directory stack count
# - .Path.Folders: Array of folder objects with Name, Path, and Display properties
#
# Git Information (when in a git repository):
# - .Git.HEAD: Current branch name (e.g., "main")
# - .Git.Ref: Git reference
# - .Git.Hash: Full commit hash
# - .Git.ShortHash: Abbreviated commit hash
# - .Git.RepoName: Repository name
# - .Git.Ahead: Number of commits ahead of upstream
# - .Git.Behind: Number of commits behind upstream
# - .Git.BranchStatus: Branch status indicator (e.g., "≢")
# - .Git.Staging: Staging area status with Added, Modified, Deleted, etc.
# - .Git.Working: Working directory status with Added, Modified, Deleted, etc.
# - .Git.Upstream: Upstream branch name
# - .Git.UpstreamGone: Boolean indicating if upstream is gone
# - .Git.UpstreamIcon: Icon representing upstream status
# - .Git.Detached: Boolean indicating detached HEAD state
# - .Git.Merge: Boolean indicating merge in progress
# - .Git.Rebase: Rebase status
# - .Git.CherryPick: Boolean indicating cherry-pick in progress
# - .Git.Revert: Boolean indicating revert in progress
#
# Kubernetes Information (when kubectl context is available):
# - .Kubectl.Context: Current kubectl context
# - .Kubectl.Cluster: Current cluster name
# - .Kubectl.Namespace: Current namespace
# - .Kubectl.User: Current user
#
# System Information:
# - .Sysinfo.Load1: 1-minute load average
# - .Sysinfo.Load5: 5-minute load average
# - .Sysinfo.Load15: 15-minute load average
# - .Sysinfo.PhysicalTotalMemory: Total physical memory in bytes
# - .Sysinfo.PhysicalAvailableMemory: Available physical memory in bytes
# - .Sysinfo.PhysicalFreeMemory: Free physical memory in bytes
# - .Sysinfo.PhysicalPercentUsed: Percentage of physical memory used
# - .Sysinfo.SwapTotalMemory: Total swap memory in bytes
# - .Sysinfo.SwapFreeMemory: Free swap memory in bytes
# - .Sysinfo.SwapPercentUsed: Percentage of swap memory used
# - .Sysinfo.Disks: Map of disk information with read/write statistics
#
# Time Information:
# - .Time.CurrentDate: Current date and time
# - .Time.Format: Time format string
#
# Shell Information:
# - .Shell.Name: Shell name
# - .Shell.Version: Shell version
#
# Usage Examples:
# - Simple username: "{{ .UserName }} "
# - Path with git status: "{{ .Folder }}{{ if .Git.HEAD }} ({{ .Git.HEAD }}){{ end }} "
# - System load: "{{ .Folder }} [{{ .Sysinfo.Load1 }}] "
transient_prompt:
background: transparent
foreground: "#6F0AFC"
template: '{{ .Time.CurrentDate | date "15:04:05" }} {{ .PWD }} '
upgrade:
auto: false
interval: "168h"
notice: false
source: cdn
shell_integration: true
blocks:
# left
- alignment: left
type: prompt
overflow: clip
segments:
- style: diamond
background: "#000000"
foreground: "#0a77b6"
interactive: true
max_depth: 10
display_root: false
properties:
folder_icon: " <#2C2C2C> </>"
folder_separator_icon: " / "
style: agnoster_short
max_depth: 3
type: path
- background: "#000000"
foreground_templates:
- "{{ if or (.Working.Changed) (.Staging.Changed) }}#F851D1{{ end }}"
- "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#FFCC33{{ end }}"
- "{{ if gt .Ahead 0 }}greenyellow{{ end }}"
- "{{ if gt .Behind 0 }}turquoise{{ end }}"
trailing_diamond: ""
properties:
branch_ahead_icon: "↑ "
branch_behind_icon: "↓ "
branch_template: "{{ .HEAD }}{{if .BranchStatus }}d{{ .BranchStatus }}{{ end }}"
branch_icon: " "
fetch_status: true
fetch_upstream_icon: true
fetch_worktree_count: true
mapped_branches:
"bug/*": "🐛 "
"feat/*": "🚀 "
style: powerline
template: " {{ .UpstreamIcon }} {{ .HEAD }}{{if .LatestTag }}{{ .LatestTag }}{{end}} "
type: git
- background_templates:
- "{{ if or (.Working.Changed) (.Staging.Changed) }}#FA36C6{{ end }}"
- "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#FFCC33{{ end }}"
- "{{ if gt .Ahead 0 }}yellow{{ end }}"
- "{{ if gt .Behind 0 }}pink{{ end }}"
foreground_templates:
- "{{ if or (.Working.Changed) (.Staging.Changed) }}#FFFFFF{{ end }}"
- "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#FFFFFF{{ end }}"
- "{{ if gt .Ahead 0 }}greenyellow{{ end }}"
- "{{ if gt .Behind 0 }}turquoise{{ end }}"
trailing_diamond: ""
properties:
branch_ahead_icon: "↑ "
branch_behind_icon: "↓ "
branch_template: "{{ .HEAD }}{{if .BranchStatus }}d{{ .BranchStatus }}{{ end }}"
branch_icon: " "
fetch_status: true
fetch_upstream_icon: true
fetch_worktree_count: true
mapped_branches:
"bug/*": "🐛 "
"feat/*": "🚀 "
style: powerline
template: "{{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 }} "
type: git
- background: "#6FFF00"
style: diamond
trailing_diamond: " $"
type: shell
template: "  "
- type: root
style: powerline
powerline_symbol: 
foreground: "#FB1010"
background: "#2F2F2F"
template: 
# right
- alignment: right
overflow: clip
type: rprompt
segments:
# - background: "#565656"
# foreground: "#faa029"
# leading_diamond: ""
# style: diamond
# template: " {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} "
# trailing_diamond: ""
# type: aws
- background: "#a60fcc"
foreground: "#d6deeb"
leading_diamond: ""
properties:
style: round
threshold: 10
style: diamond
template: " {{ .FormattedMs }} "
trailing_diamond: ""
type: executiontime
- background: "#d2d2d2"
foreground: "#01a300"
leading_diamond: ""
style: diamond
template: "<#2829b2></> <#be1818></> cmake {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
trailing_diamond: ""
type: cmake
- background: "#000"
foreground: "#1c98d1"
leading_diamond: ""
style: diamond
template: "  {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}"
trailing_diamond: ""
type: go
- background: "#000"
foreground: "#626262"
leading_diamond: ""
properties:
fetch_package_manager: true
npm_icon: "<#cc3a3a></> "
yarn_icon: "<#348cba></> "
pnpm_icon: "<#ff0000></> "
style: diamond
template: " {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }}{{ end }}{{ .Major }}.{{ .Minor }} "
trailing_diamond: ""
type: node
- background: "#6488c0"
foreground: "#1e293b"
leading_diamond: ""
style: diamond
template: "Nx {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
trailing_diamond: ""
type: nx
- background: "#000"
foreground: "#968325"
leading_diamond: ""
style: diamond
properties:
display_mode: files
extensions:
- "*.py"
- "*.pyc"
- "*.pyo"
- "*.pyd"
- "*.pyw"
- ".venv"
template: "  {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }}"
trailing_diamond: ""
type: python
- background: "#ffffff"
foreground: "#000000"
leading_diamond: ""
style: diamond
template: " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
trailing_diamond: ""
type: rust
- background: "#fe562e"
foreground: "#ffffff"
leading_diamond: ""
style: diamond
template: " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
trailing_diamond: ""
type: swift
- background: "#000000"
foreground: "#0483eb"
leading_diamond: ""
style: diamond
template: " {{ trunc 10 .Context }}:{{if .Namespace}}{{.Namespace}}{{else}}default*{{end}} "
trailing_diamond: ""
type: kubectl
- background: "#000000"
foreground: "#414040"
leading_diamond: ""
style: diamond
template: "  {{ round .PhysicalPercentUsed 1 }} "
type: sysinfo
- background: "#000000"
foreground: "#302f2f"
properties:
time_format: "15:04:05.000Z07:00"
style: diamond
template: '󰥔 {{ dateInZone "15:04Z" .CurrentDate "UTC" }} '
# template: ' 󰥔 {{ .CurrentDate | date .Format }} {{ dateInZone "15:04Z" .CurrentDate "UTC" }}'
type: time
@mateothegreat
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment