1
0
mirror of https://github.com/akelge/zsh synced 2025-07-03 21:19:06 +00:00

Add starship theme, renamed omp to oh-my-posh

This commit is contained in:
2021-12-29 07:34:42 +01:00
parent 8d0b2db580
commit c577ac480e
3 changed files with 855 additions and 6 deletions

138
oh-my-posh/mypure.omp.yaml Normal file
View File

@ -0,0 +1,138 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
console_title: true
console_title_style: template
console_title_template: '{{if .Env.SSH_CONNECTION}} {{ .Host }} {{end}}{{.Path}}'
final_space: false
blocks:
- type: prompt
alignment: left
newline: false
segments:
- type: session
style: plain
foreground: yellow
properties:
postfix: ""
prefix: ""
template: '{{if .SSHSession}}|{{ .ComputerName }}| {{end}}'
- type: text
style: plain
foreground: green
properties:
prefix: ""
postfix: ""
text: "$([ $(jobs|wc -l|xargs) -gt 0 ] && echo '\u2622 ')"
- type: root
style: plain
foreground: yellow
properties:
postfix: ""
prefix: ""
root_icon: "\u26A1"
# root_icon: "# "
- type: path
style: plain
# style: agnoster_left
max_depth: 2
foreground: lightBlue
properties:
prefix: ""
style: full
- type: git
style: plain
foreground: yellow
properties:
branch_ahead_icon: <#88C0D0>⇡</>
branch_behind_icon: <#88C0D0>⇣</>
branch_icon: ""
display_status: true
fetch_status: true
prefix: ""
template: '{{ .HEAD }}{{.BranchStatus}}{{ if .Working.Changed }}<#FF0000>* {{ .Working.String }}</>{{ end }}'
# template: '{{.BranchStatus}}{{ if .Working.Changed }}<#FF0000>* {{ .Working.String }}</>{{ end }}'
- type: executiontime
style: plain
foreground: yellow
properties:
always_enabled: false
postfix: ""
prefix: " "
style: austin
threshold: 30000
- type: prompt
alignment: right
segments:
- type: aws
style: plain
foreground: yellow
properties:
postfix: ""
prefix: " "
# prefix: " "
template: '{{if .Profile}}{{.Profile}}{{end}}'
- type: kubectl
style: plain
foreground: lightBlue
properties:
display_error: true
parse_kubeconfig: true
postfix: ""
prefix: ""
# template: '{{if eq "on" .Env.KUBE_PS1_ENABLED}} ﴱ {{.Context}}{{if .Namespace}}/{{.Namespace}}{{end}}{{end}}'
template: '{{if eq "on" .Env.KUBE_PS1_ENABLED}} ﴱ {{.Context}}/{{.Namespace}}{{end}}'
# template: '{{ .Context }}/{{ .Namespace }}'
- type: command
style: plain
foreground: green
properties:
shell: /bin/sh
command: "ifconfig utun2 > /dev/null 2>&1 && echo '\uF023' || echo '\0'"
- type: prompt
alignment: left
newline: true
segments:
- type: python
style: plain
foreground: darkGray
properties:
display_version: false
postfix: ""
prefix: ""
- type: exit
style: plain
foreground: lightYellow
foreground_templates:
- '{{ if gt .Code 0 }}#FF0000{{ end }}'
properties:
always_enabled: true
prefix: ""
# template:
template: "\u276F"
tooltips:
- type: kubectl
style: plain
foreground: lightBlue
postfix: ""
prefix: ""
tips:
- kubectl
- k
- stern
properties:
template: 'ﴱ {{.Context}}{{ if .Namespace }}/{{.Namespace}}{{end}}'

View File

@ -0,0 +1,118 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
console_title: true
console_title_style: template
console_title_template: '{{if .Env.SSH_CONNECTION}} {{ .Host }} {{end}}{{.Path}}'
final_space: false
blocks:
- type: prompt
alignment: left
newline: false
segments:
- type: session
style: plain
foreground: yellow
properties:
postfix: ""
prefix: ""
template: '{{if .SSHSession}}@{{ .ComputerName }} {{end}}'
- type: root
style: plain
foreground: yellow
properties:
postfix: ""
prefix: ""
root_icon: "\u26A1"
# root_icon: "# "
- type: path
style: plain
# style: agnoster_left
max_depth: 2
foreground: lightBlue
properties:
prefix: ""
style: full
- type: git
style: plain
foreground: yellow
properties:
branch_ahead_icon: <#88C0D0>⇡</>
branch_behind_icon: <#88C0D0>⇣</>
branch_icon: ""
display_status: true
fetch_status: true
prefix: ""
template: '{{ .HEAD }}{{.BranchStatus}}{{ if .Working.Changed }}<#FF0000>* {{ .Working.String }}</>{{ end }}'
# template: '{{.BranchStatus}}{{ if .Working.Changed }}<#FF0000>* {{ .Working.String }}</>{{ end }}'
- type: executiontime
style: plain
foreground: yellow
properties:
always_enabled: false
postfix: ""
prefix: " "
style: austin
threshold: 30000
- type: prompt
alignment: right
segments:
- type: aws
style: plain
foreground: "#ffA000"
properties:
postfix: ""
# prefix: " "
prefix: " "
template: '{{if .Profile}}{{.Profile}}{{end}}'
- type: kubectl
style: plain
foreground: lightBlue
properties:
parse_kubeconfig: true
postfix: ""
prefix: " "
template: '{{if eq "on" .Env.KUBE_PS1_ENABLED}}|{{.Context}}/{{if .Namespace}}{{.Namespace}}{{else}}default{{end}}|{{end}}'
# - type: command
# style: plain
# foreground: white
# properties:
# shell: /bin/sh
# # command: "ifconfig utun2 > /dev/null 2>&1 && echo '\uF023' || echo ''"
# # command: "ifconfig utun2 > /dev/null 2>&1 && echo '<#00FF00>\u2713</>' || echo '\u2717'"
# command: "ifconfig utun2 > /dev/null 2>&1 && echo '<#00FF00>\u2713</>' || echo ' '"
- type: prompt
alignment: left
newline: true
segments:
- type: python
style: plain
foreground: darkGray
properties:
display_version: false
postfix: ""
prefix: ""
- type: exit
style: plain
foreground: lightYellow
foreground_templates:
- '{{ if gt .Code 0 }}#FF0000{{ end }}'
properties:
always_enabled: true
prefix: ""
# template:
template: "\u276F"