Converted to Yaml, added python venv segment

This commit is contained in:
Adam Kruszewski 2024-04-27 12:00:10 +02:00
parent 49cbbf2de5
commit f8948b99fb
2 changed files with 44 additions and 63 deletions

View file

@ -1,63 +0,0 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"foreground": "#000000",
"style": "plain",
"template": "\u274c",
"type": "status"
},
{
"foreground": "#ff0000",
"style": "plain",
"template": "#",
"type": "root"
},
{
"background": "#ffffff",
"foreground": "#000000",
"properties": {
"folder_icon": "\u2026",
"folder_separator_icon": " \ue0b1 ",
"style": "agnoster_short",
"max_depth": 2,
"home_icon": "🏡",
"mapped_locations": {
"~/Src/opensource": "\uF09B "
}
},
"style": "plain",
"template": "{{ .Path }} ",
"type": "path"
},
{
"background": "#ffffff",
"foreground": "#000000",
"properties": {
"cherry_pick_icon": "\u2713 ",
"commit_icon": "\u25b7 ",
"fetch_status": true,
"merge_icon": "\u25f4 ",
"no_commits_icon": "no commits",
"rebase_icon": "\u2c62 ",
"tag_icon": "\u25b6 "
},
"style": "plain",
"template": "({{ .HEAD }}{{ if and (eq .Ahead 0) (eq .Behind 0) }} \u2261{{end}}{{ if gt .Ahead 0 }} \u2191{{.Ahead}}{{end}}{{ if gt .Behind 0 }} \u2193{{.Behind}}{{end}} {{ if .Working.Changed }}+{{ .Working.Added }} ~{{ .Working.Modified }} -{{ .Working.Deleted }} {{ end }})",
"type": "git"
},
{
"foreground": "#000000",
"style": "plain",
"template": "\ue0b1 ",
"type": "text"
}
],
"type": "prompt"
}
],
"version": 2
}

44
adam-minimal.omp.yaml Normal file
View file

@ -0,0 +1,44 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
version: 2
blocks:
- type: prompt
alignment: left
segments:
- type: status
foreground: "#000000"
template:
- type: root
foreground: "#ff0000"
template: "#"
- type: path
foreground: "#000000"
template: "{{ .Path }} "
properties:
folder_icon:
folder_separator_icon: " \ue0b1 "
home_icon: 🏡
mapped_locations:
~/Src/opensource: "\uf09b "
max_depth: 2.0
style: agnoster_short
- type: git
foreground: "#193549"
foreground_templates:
- "{{ if or (.Working.Changed) (.Staging.Changed) }}#193549{{ end }}"
- "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#FFCC80{{ end }}"
- "{{ if gt .Ahead 0 }}#B388FF{{ end }}"
- "{{ if gt .Behind 0 }}#B388FB{{ end }}"
template: "{{ .UpstreamIcon }}{{ .HEAD }}{{ if or
(.Working.Changed) (.Staging.Changed) (gt .StashCount 0)}} {{end}}{{ if .Working.Changed }}\uF448{{ end }}{{ if .Staging.Changed }}{{ end }}{{ if gt .StashCount 0 }}{{ end }} "
properties:
fetch_status: true
fetch_upstream_icon: true
untracked_modes:
/Users/user/Projects/oh-my-posh/: "no"
- type: python
foreground: "#00b041"
template: "\ue235 {{ .Venv }} "
- type: text
foreground: "#000000"
template: "\ue0b1 "