Skip to content

Instantly share code, notes, and snippets.

@AhsenBaig
Last active February 14, 2022 20:01
Show Gist options
  • Save AhsenBaig/4f9a99fab9d3034e6633f9ae58fe626c to your computer and use it in GitHub Desktop.
Save AhsenBaig/4f9a99fab9d3034e6633f9ae58fe626c 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",
"final_space": false,
"osc99": true,
"console_title": true,
"console_title_style": "template",
"console_title_template": "{{ .Folder }}",
"transient_prompt": {
"background": "transparent",
"foreground": "#c4c4c4",
"template": "\ue285 "
},
"blocks": [
{
"type": "prompt",
"alignment": "left",
"newline": true,
"segments": [
{
"type": "os",
"style": "powerline",
"foreground": "#c4c4c4",
"background": "#575656",
"properties": {
"postfix": "",
"windows": "\uf871 ",
"macos": "\uf179 ",
"ubuntu": "\uf31b "
}
},
{
"type": "battery",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#c4c4c4",
"background": "#575656",
"background_templates": [
"{{if eq \"Charging\" .State.String}}#0abab5{{end}}",
"{{if eq \"Discharging\" .State.String}}#cb410b{{end}}",
"{{if eq \"Full\" .State.String}}#006400{{end}}"
],
"properties": {
"charged_icon": "\ue22f ",
"charging_icon": "\uf583 ",
"color_background": true,
"discharging_icon": "\uf582 ",
"postfix": "",
"template": "{{ if not .Error }}{{.Icon}}{{.Percentage}}{{ end }}"
}
},
{
"type": "shell",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#c4c4c4",
"background": "#575656",
"properties": {
"prefix": "\uf489 ",
"postfix": "",
"mapped_shell_names": {
"pwsh": "PS",
"powershell": "PS"
}
}
},
{
"type": "path",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#000000",
"background": "#c4c4c4",
"properties": {
"style": "full",
"enable_hyperlink": true,
"mapped_locations": {
"D:\\source\\repos": "\uF09B",
"C:\\source\\repos": "\uF09B"
}
}
},
{
"type": "executiontime",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#c4c4c4",
"background": "#575656",
"properties": {
"threshold": 0,
"style": "austin"
}
}
]
},
{
"type": "prompt",
"alignment": "right",
"newline": false,
"segments": [
{
"type": "git",
"style": "diamond",
"leading_diamond": "\uE0B2",
"trailing_diamond": "\uE0B0",
"foreground": "#011627",
"background": "#17D7A0",
"properties": {
"branch_icon": "\ue725 ",
"fetch_status": true,
"fetch_stash_count": true,
"fetch_worktree_count": true,
"fetch_upstream_icon": true,
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
}
}
]
},
{
"type": "prompt",
"alignment": "left",
"newline": true,
"segments": [
{
"type": "text",
"style": "plain",
"properties": {
"prefix": "",
"postfix": "",
"text": "╭─"
}
},
{
"type": "time",
"style": "plain",
"properties": {
"prefix": " \u2665 ",
"postfix": " |",
"time_format": "Mon, 01/02/06 | 3:04:05 PM"
}
},
{
"type": "root",
"style": "plain",
"properties": {
"root_icon": "\uf292 "
}
}
]
},
{
"type": "prompt",
"alignment": "left",
"newline": true,
"segments": [
{
"type": "exit",
"style": "plain",
"properties": {
"prefix": "",
"template": "╰─",
"always_enabled": true
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment