Add oh my posh

This commit is contained in:
Gabriel Brown 2025-01-30 13:21:06 -06:00
parent c0951327f4
commit 8236b01636
4 changed files with 268 additions and 2 deletions

View File

@ -0,0 +1,192 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"transient_prompt": {
"template": " {{ .AbsolutePWD }} : ",
"foreground": "#f8f8f2",
"background": "transparent",
"newline": true
},
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"properties": {
"cache_duration": "none"
},
"template": "\n\u256d\u2500",
"foreground": "#f8f8f2",
"type": "text",
"style": "plain"
},
{
"properties": {
"cache_duration": "none"
},
"leading_diamond": "\ue0b6",
"template": "{{ .UserName }}@{{ .HostName }}",
"foreground": "#f8f8f2",
"background": "#282a36",
"type": "session",
"style": "diamond"
},
{
"properties": {
"cache_duration": "none"
},
"template": "\udb85\udc0b",
"foreground": "#ff5555",
"powerline_symbol": "\ue0b0",
"background": "#282a36",
"type": "root",
"style": "powerline"
},
{
"properties": {
"cache_duration": "none"
},
"template": "{{ .Icon }} ",
"foreground": "#f8f8f2",
"powerline_symbol": "\ue0b0",
"background": "#282a36",
"type": "os",
"style": "powerline"
},
{
"properties": {
"cache_duration": "none",
"style": "full"
},
"trailing_diamond": "\ue0b4",
"template": " \udb80\ude56 {{ path .Path .Location }}",
"foreground": "#282a36",
"background": "#cccccc",
"type": "path",
"style": "diamond"
}
]
},
{
"type": "prompt",
"alignment": "right",
"segments": [
{
"properties": {
"branch_icon": "",
"cache_duration": "none",
"display_changing_color": true,
"fetch_status": true,
"fetch_upstream_icon": true,
"full_branch_path": true
},
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b4",
"template": "\ue725 ({{ url .UpstreamIcon .UpstreamURL }} {{ url .HEAD .UpstreamURL }}){{ if gt .Ahead 0 }}<#50fa7b> +{{ .Ahead }}</>{{ end }}{{ if gt .Behind 0 }}<#ff5555> -{{ .Behind }}</>{{ end }}{{ if .Working.Changed }}<#f8f8f2> \uf044 {{ .Working.String }}</>{{ end }}{{ if .Staging.Changed }}<#f8f8f2> \uf046 {{ .Staging.String }}</>{{ end }}",
"foreground": "#282a36",
"background": "#ffb86c",
"type": "git",
"style": "diamond"
},
{
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b4",
"template": "\ue718 {{ .Full }}",
"foreground": "#282a36",
"background": "#50fa7b",
"type": "node",
"style": "diamond"
},
{
"properties": {
"display_mode": "files",
"extensions": [
"package-lock.json"
]
},
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b4",
"template": "\ue71e {{ .Full }}",
"foreground": "#282a36",
"background": "#ff5555",
"type": "npm",
"style": "diamond"
},
{
"properties": {
"display_mode": "files",
"extensions": [
"pnpm-lock.yaml"
]
},
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b4",
"template": "\udb80\udec1 {{ .Full }}",
"foreground": "#282a36",
"background": "#ffb86c",
"type": "pnpm",
"style": "diamond"
},
{
"properties": {
"display_mode": "files"
},
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b4",
"template": "\ue73c {{ .Full }}",
"foreground": "#282a36",
"background": "#50fa7b",
"type": "python",
"style": "diamond"
},
{
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b4",
"template": "\ue738 {{ .Full }}",
"foreground": "#282a36",
"background": "#ff79c6",
"type": "java",
"style": "diamond"
},
{
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b4",
"template": "\uf308 {{ .Context }}",
"foreground": "#282a36",
"background": "#8be9fd",
"type": "docker",
"style": "diamond"
},
{
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b4",
"template": "\ue73d {{ .Full }}",
"foreground": "#f8f8f2",
"background": "#6272a4",
"type": "php",
"style": "diamond"
}
]
},
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"properties": {
"always_enabled": true,
"cache_duration": "none"
},
"template": "\u2570\u2500 ",
"foreground": "#f8f8f2",
"type": "text",
"style": "diamond"
}
],
"newline": true
}
],
"version": 3,
"patch_pwsh_bleed": true,
"final_space": true
}

View File

@ -0,0 +1,74 @@
#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
version = 2
final_space = true
console_title_template = '{{ .Shell }} in {{ .Folder }}'
[[blocks]]
type = 'prompt'
alignment = 'left'
newline = true
[[blocks.segments]]
type = 'path'
style = 'plain'
background = 'transparent'
foreground = 'blue'
template = '{{ .Path }}'
[blocks.segments.properties]
style = 'full'
[[blocks.segments]]
type = 'git'
style = 'plain'
foreground = 'p:grey'
background = 'transparent'
template = ' {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} <cyan>{{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }}</>'
[blocks.segments.properties]
branch_icon = ''
commit_icon = '@'
fetch_status = true
[[blocks]]
type = 'rprompt'
overflow = 'hidden'
[[blocks.segments]]
type = 'executiontime'
style = 'plain'
foreground = 'yellow'
background = 'transparent'
template = '{{ .FormattedMs }}'
[blocks.segments.properties]
threshold = 5000
[[blocks]]
type = 'prompt'
alignment = 'left'
newline = true
[[blocks.segments]]
type = 'text'
style = 'plain'
foreground_templates = [
"{{if gt .Code 0}}red{{end}}",
"{{if eq .Code 0}}magenta{{end}}",
]
background = 'transparent'
template = ''
[transient_prompt]
foreground_templates = [
"{{if gt .Code 0}}red{{end}}",
"{{if eq .Code 0}}magenta{{end}}",
]
background = 'transparent'
template = ' '
[secondary_prompt]
foreground = 'magenta'
background = 'transparent'
template = ' '

@ -1 +1 @@
Subproject commit fd9a7dd4f2afccaeb61623286b1230c0df0c7033
Subproject commit b9ac086adf5c14d07f8b60a7009acd878f6cf7ca

@ -1 +1 @@
Subproject commit b509fcaf6119d5c4b07fe37692fc3d5c6cb94f56
Subproject commit f682e17b30def8ebbf9b4b3f0a60df0443633e4c