Skip to content

Instantly share code, notes, and snippets.

@swordfeng
Last active November 11, 2023 09:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swordfeng/683632355cb2ecc54c14a3f57e47f2b3 to your computer and use it in GitHub Desktop.
Save swordfeng/683632355cb2ecc54c14a3f57e47f2b3 to your computer and use it in GitHub Desktop.
Prompt config with OMP
version: 2
blocks:
- type: prompt
alignment: left
segments:
- type: text
template: "["
foreground: white
- type: text
template: "{{ .UserName }}"
foreground: yellow
- type: text
template: "@"
foreground: white
- type: text
template: "{{ .HostName }} "
foreground: cyan
- type: path
template: "{{ .Path }}"
foreground: green
properties:
style: full
- type: text
template: "]"
foreground: white
- type: status
template: "{{ if .Error }}(#`Д´)ノ{{ else }}(*´∀`)~{{ end }}"
foreground_templates: ["{{ if .Error }}lightRed{{ else }}green{{ end }}"]
properties:
always_enabled: true
- type: text
template: "{{ if .Root }}#{{ else }}${{ end }} "
foreground: white
- type: rprompt
alignment: right
segments:
- type: status
template: "{{ if ne .Code 0 }}{{ .Code }} <={{end}}"
foreground: lightBlue
- type: time
foreground: lightRed
properties:
time_format: 2006-01-02 Monday 15:04:05 MST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment