diff --git a/.zsh/oh-my-custom/oh-my-posh.yaml b/.zsh/oh-my-custom/oh-my-posh.yaml index 859fd98..ddb14b0 100644 --- a/.zsh/oh-my-custom/oh-my-posh.yaml +++ b/.zsh/oh-my-custom/oh-my-posh.yaml @@ -1,156 +1,142 @@ -blocks: - - type: prompt - alignment: left - newline: true - segments: - - type: time - style: diamond - leading_diamond: &ld '<#666>[ ' - trailing_diamond: &td '<#666> ]' - foreground: p:white - template: '{{ .CurrentDate | date "15:04:05" }}' - - - type: session - style: diamond - leading_diamond: *ld - trailing_diamond: *td - foreground: p:green - template: '{{ .UserName }}{{ if .SSHSession }}@{{ .HostName }}{{ end }}' - - - type: command - style: diamond - leading_diamond: *ld - trailing_diamond: *td - foreground: p:red - properties: - command: '~/bin/config-git-status.sh && echo "unmod" || echo "mod"' - shell: bash - template: '{{ if eq .Output "mod" }}{{ end }}' - - - type: kubectl - style: diamond - leading_diamond: *ld - trailing_diamond: *td - foreground: p:white - foreground_templates: - - '{{ if eq .Context "int" }}p:yellow{{ end }}' - - '{{ if eq .Context "minikube" }}p:green{{ end }}' - - '{{ if eq .Context "prod" }}p:red{{ end }}' - template: '{{ .Context }}' - - - type: command - alias: ShortPath - style: diamond - leading_diamond: *ld - trailing_diamond: *td - foreground: p:yellow - properties: - command: short_path - template: '{{ .Output }}' - - - type: exit - style: diamond - leading_diamond: *ld - trailing_diamond: *td - foreground: p:white - foreground_templates: - - '{{ if gt .Code 0 }}p:red{{ end }}' - properties: - always_enabled: false - template: '{{ if gt .Code 0 }}{{ .Code }}{{ else }}{{ end }}' - - - type: text - style: plain - template: "\u200b" - - - type: prompt - alignment: right - overflow: hide - segments: - - type: executiontime - style: diamond - leading_diamond: *ld - trailing_diamond: *td - properties: - style: austin - template: '{{ .FormattedMs }}' - - - type: git - style: diamond - leading_diamond: *ld - trailing_diamond: *td - foreground: p:green - foreground_templates: - - '{{ if or (.Working.Changed) (.Staging.Changed) }}p:yellow{{ end }}' - - '{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:red{{ end }}' - - '{{ if gt .Ahead 0 }}#8173bf{{ end }}' - - '{{ if gt .Behind 0 }}#bd4ba7{{ end }}' - properties: - bitbucket_icon: "\ue703" - branch_icon: '' - branch_max_length: 25 - fetch_status: true - fetch_upstream_icon: true - github_icon: "\ue709" - git_icon: "\uf1d3" - gitlab_icon: "\uf296" - templates: - - '{{ if .UpstreamURL }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}' - - '{{ .HEAD }} ({{ .ShortHash }})' - - '{{ if .BranchStatus }} {{ .BranchStatus }}{{ end }}' - - '{{ if .Working.Changed }}  {{ .Working.String }}{{ end }}' - - '{{ if .Staging.Changed }}  {{ .Staging.String }}{{ end }}' - - - type: prompt - alignment: left - newline: true - segments: - - type: text - style: plain - foreground: p:yellow - template: "<#666>#" - - - type: text - style: hidden - foreground: p:red - template: "{{ .Segments }}" - -console_title_template: "{{ .UserName }}@{{ .HostName }} \u279c {{ .Segments.Shortpath.Output }}" - -final_space: true +# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json palette: - black: '#262B44' - blue: '#4B95E9' - gray: '#333333' - green: '#00bc00' - orange: '#F07623' - red: '#c91b00' - white: '#E0DEF4' - yellow: '#f4f400' - darkblue: '#0b1052' - + black: "#262B44" + blue: "#4B95E9" + darkblue: "#0b1052" + gray: "#333333" + green: "#00bc00" + orange: "#F07623" + red: "#c91b00" + white: "#E0DEF4" + yellow: "#f4f400" +console_title_template: "{{ .UserName }}@{{ .HostName }} ➜ {{ .Segments.Shortpath.Output }}" +blocks: +- type: prompt + alignment: left + segments: + - leading_diamond: "<#666>[ " + trailing_diamond: "<#666> ]" + template: "{{ .CurrentDate | date \"15:04:05\" }}" + foreground: p:white + type: time + style: diamond + - leading_diamond: "<#666>[ " + trailing_diamond: "<#666> ]" + template: "{{ .UserName }}{{ if .SSHSession }}@{{ .HostName }}{{ end }}" + foreground: p:green + type: session + style: diamond + - properties: + command: ~/bin/config-git-status.sh && echo "unmod" || echo "mod" + shell: bash + leading_diamond: "<#666>[ " + trailing_diamond: "<#666> ]" + template: "{{ if eq .Output \"mod\" }}\uf00d{{ end }}" + foreground: p:red + type: command + style: diamond + - leading_diamond: "<#666>[ " + trailing_diamond: "<#666> ]" + template: "{{ .Context }}" + foreground: p:white + type: kubectl + style: diamond + foreground_templates: + - "{{ if eq .Context \"int\" }}p:yellow{{ end }}" + - "{{ if eq .Context \"minikube\" }}p:green{{ end }}" + - "{{ if eq .Context \"prod\" }}p:red{{ end }}" + - properties: + command: short_path + alias: ShortPath + leading_diamond: "<#666>[ " + trailing_diamond: "<#666> ]" + template: "{{ .Output }}" + foreground: p:yellow + type: command + style: diamond + - properties: + always_enabled: false + leading_diamond: "<#666>[ " + trailing_diamond: "<#666> ]" + template: "{{ if gt .Code 0 }}{{ .Code }}{{ else }}\uf00c{{ end }}" + foreground: p:white + type: exit + style: diamond + foreground_templates: + - "{{ if gt .Code 0 }}p:red{{ end }}" + - template: ​ + type: text + style: plain + newline: true +- type: prompt + alignment: right + overflow: hide + segments: + - properties: + style: austin + leading_diamond: "<#666>[ " + trailing_diamond: "<#666> ]" + template: "{{ .FormattedMs }}" + type: executiontime + style: diamond + - properties: + bitbucket_icon:  + branch_icon: "" + branch_max_length: 25 + fetch_status: true + fetch_upstream_icon: true + git_icon:  + github_icon:  + gitlab_icon:  + leading_diamond: "<#666>[ " + trailing_diamond: "<#666> ]" + foreground: p:green + type: git + style: diamond + foreground_templates: + - "{{ if or (.Working.Changed) (.Staging.Changed) }}p:yellow{{ end }}" + - "{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:red{{ end }}" + - "{{ if gt .Ahead 0 }}#8173bf{{ end }}" + - "{{ if gt .Behind 0 }}#bd4ba7{{ end }}" + templates: + - "{{ if .UpstreamURL }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}" + - "{{ .HEAD }} ({{ .ShortHash }})" + - "{{ if .BranchStatus }} {{ .BranchStatus }}{{ end }}" + - "{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}" + - "{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}" +- type: prompt + alignment: left + segments: + - template: "<#666>#" + foreground: p:yellow + type: text + style: plain + - template: "{{ .Segments }}" + foreground: p:red + type: text + style: hidden + newline: true tooltips: - - type: aws - style: diamond - leading_diamond: &ttld  - trailing_diamond: &tttd  - background: p:orange - foreground: p:white - properties: - display_default: true - template: '  {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} ' - tips: - - aws - - - type: az - style: diamond - leading_diamond: *ttld - trailing_diamond: *tttd - background: p:blue - foreground: p:white - template: ' ﴃ {{ .Name }} ' - tips: - - az - -version: 2 +- properties: + display_default: true + leading_diamond:  + trailing_diamond:  + template: " \ue7ad {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} " + foreground: p:white + background: p:orange + type: aws + style: diamond + tips: + - aws +- leading_diamond:  + trailing_diamond:  + template: " ﴃ {{ .Name }} " + foreground: p:white + background: p:blue + type: az + style: diamond + tips: + - az +version: 3 +final_space: true