mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-26 03:24:04 -08:00
feat(theme)!: migrate devious-diamonds to YAML
BREAKING CHANGE: Extension change from "json" to "yaml" necessitates changes in init params
This commit is contained in:
parent
51754843f4
commit
f480533a7a
|
@ -57,7 +57,7 @@ RUN pwsh -Command Install-Module posh-git -Scope AllUsers -Force; \
|
|||
ENV PATH "$PATH:/home/${USERNAME}/bin"
|
||||
|
||||
# Can be used to override the devcontainer prompt default theme:
|
||||
ENV POSH_THEME="/workspaces/oh-my-posh/themes/jandedobbeleer.omp.json"
|
||||
ENV POSH_THEME="/workspaces/oh-my-posh/themes/jandedobbeleer.omp.yaml"
|
||||
|
||||
# Deploy oh-my-posh prompt to Powershell:
|
||||
COPY Microsoft.PowerShell_profile.ps1 /home/${USERNAME}/.config/powershell/Microsoft.PowerShell_profile.ps1
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
// Options:
|
||||
|
||||
"POSH_THEME": "/workspaces/oh-my-posh/themes/jandedobbeleer.omp.json",
|
||||
"POSH_THEME": "/workspaces/oh-my-posh/themes/jandedobbeleer.omp.yaml",
|
||||
|
||||
// Override me with your own timezone:
|
||||
"TZ": "UTC",
|
||||
|
|
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
|
@ -10,9 +10,7 @@
|
|||
}
|
||||
},
|
||||
"go.formatTool": "gofmt",
|
||||
"go.formatFlags": [
|
||||
"-s"
|
||||
],
|
||||
"go.formatFlags": ["-s"],
|
||||
"azureFunctions.deploySubpath": "docs/api",
|
||||
"azureFunctions.postDeployTask": "npm install (functions)",
|
||||
"azureFunctions.projectLanguage": "JavaScript",
|
||||
|
|
|
@ -1,287 +0,0 @@
|
|||
{
|
||||
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
||||
"blocks": [
|
||||
{
|
||||
"alignment": "left",
|
||||
"newline": true,
|
||||
"segments": [
|
||||
{
|
||||
"type": "iterm",
|
||||
"style": "plain",
|
||||
"foreground": "cyan",
|
||||
"template": "{{ .PromptMark }}"
|
||||
},
|
||||
{
|
||||
"foreground": "cyan",
|
||||
"properties": {
|
||||
"alpine": "\uf300",
|
||||
"arch": "\uf303",
|
||||
"centos": "\uf304",
|
||||
"debian": "\uf306",
|
||||
"elementary": "\uf309",
|
||||
"fedora": "\uf30a",
|
||||
"gentoo": "\uf30d",
|
||||
"linux": "\ue712",
|
||||
"macos": "\uf179",
|
||||
"manjaro": "\uf312",
|
||||
"mint": "\uf30f",
|
||||
"opensuse": "\uf314",
|
||||
"raspbian": "\uf315",
|
||||
"ubuntu": "\uf31b",
|
||||
"windows": "\uf871",
|
||||
"wsl": "\ue712",
|
||||
"wsl_separator": " on "
|
||||
},
|
||||
"style": "diamond",
|
||||
"template": " {{ if .WSL }}\ue62a\uf44c{{ end }}{{.Icon}}\u2550",
|
||||
"trailing_diamond": "<transparent,>\ue0b2</>",
|
||||
"type": "os"
|
||||
},
|
||||
{
|
||||
"background": "green",
|
||||
"foreground": "black",
|
||||
"leading_diamond": "\ue0b2",
|
||||
"style": "diamond",
|
||||
"template": " \uf489 {{ .Name }} ",
|
||||
"type": "shell"
|
||||
},
|
||||
{
|
||||
"background": "magenta",
|
||||
"foreground": "black",
|
||||
"powerline_symbol": "\ue0bc",
|
||||
"style": "powerline",
|
||||
"template": " {{ if .SSHSession }}\uf817 {{ end }}{{ .UserName }}@{{ .HostName }} ",
|
||||
"type": "session"
|
||||
},
|
||||
{
|
||||
"background": "lightCyan",
|
||||
"foreground": "black",
|
||||
"powerline_symbol": "\ue0bc",
|
||||
"properties": {
|
||||
"fetch_version": true
|
||||
},
|
||||
"style": "powerline",
|
||||
"template": " \ue624 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
|
||||
"type": "julia"
|
||||
},
|
||||
{
|
||||
"background": "lightCyan",
|
||||
"foreground": "black",
|
||||
"powerline_symbol": "\ue0bc",
|
||||
"properties": {
|
||||
"fetch_version": true
|
||||
},
|
||||
"style": "powerline",
|
||||
"template": " \ue626 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
|
||||
"type": "go"
|
||||
},
|
||||
{
|
||||
"background": "lightCyan",
|
||||
"foreground": "black",
|
||||
"powerline_symbol": "\ue0bc",
|
||||
"style": "powerline",
|
||||
"template": " \ue738 {{ .Full }}",
|
||||
"type": "java"
|
||||
},
|
||||
{
|
||||
"background": "lightCyan",
|
||||
"foreground": "black",
|
||||
"powerline_symbol": "\ue0bc",
|
||||
"style": "powerline",
|
||||
"template": " \ue73d {{ .Full }} ",
|
||||
"type": "php"
|
||||
},
|
||||
{
|
||||
"background": "lightGreen",
|
||||
"foreground": "black",
|
||||
"powerline_symbol": "\ue0bc",
|
||||
"properties": {
|
||||
"fetch_version": true
|
||||
},
|
||||
"style": "powerline",
|
||||
"template": " \uf898 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} ",
|
||||
"type": "node"
|
||||
},
|
||||
{
|
||||
"background": "yellow",
|
||||
"foreground": "black",
|
||||
"powerline_symbol": "\ue0bc",
|
||||
"properties": {
|
||||
"display_mode": "files",
|
||||
"fetch_version": false
|
||||
},
|
||||
"style": "powerline",
|
||||
"template": " \ufd03 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
|
||||
"type": "azfunc"
|
||||
},
|
||||
{
|
||||
"background": "red",
|
||||
"foreground": "black",
|
||||
"powerline_symbol": "\ue0bc",
|
||||
"properties": {
|
||||
"display_mode": "files",
|
||||
"fetch_version": true
|
||||
},
|
||||
"style": "powerline",
|
||||
"template": " \ue791 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
|
||||
"type": "ruby"
|
||||
},
|
||||
{
|
||||
"background": "lightYellow",
|
||||
"foreground": "black",
|
||||
"powerline_symbol": "\ue0bc",
|
||||
"style": "powerline",
|
||||
"template": " \ufd31 {{.Context}}{{if .Namespace}} :: {{.Namespace}}{{end}} ",
|
||||
"type": "kubectl"
|
||||
},
|
||||
{
|
||||
"background": "lightYellow",
|
||||
"foreground": "black",
|
||||
"powerline_symbol": "\ue0bc",
|
||||
"properties": {
|
||||
"display_mode": "files",
|
||||
"fetch_virtual_env": false
|
||||
},
|
||||
"style": "powerline",
|
||||
"template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
|
||||
"type": "python"
|
||||
},
|
||||
{
|
||||
"background_templates": [
|
||||
"{{if contains \"default\" .Profile}}yellow{{end}}",
|
||||
"{{if contains \"jan\" .Profile}}magenta{{end}}"
|
||||
],
|
||||
"foreground": "black",
|
||||
"powerline_symbol": "\ue0bc",
|
||||
"properties": {
|
||||
"display_default": false
|
||||
},
|
||||
"style": "powerline",
|
||||
"template": " \ue7ad {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} ",
|
||||
"type": "aws"
|
||||
},
|
||||
{
|
||||
"background": "yellow",
|
||||
"foreground": "black",
|
||||
"powerline_symbol": "\ue0bc",
|
||||
"properties": {
|
||||
"time_format": "Mon | 15:04:05"
|
||||
},
|
||||
"style": "powerline",
|
||||
"template": " {{ .CurrentDate | date .Format }} ",
|
||||
"type": "time"
|
||||
},
|
||||
{
|
||||
"background": "cyan",
|
||||
"foreground": "black",
|
||||
"properties": {
|
||||
"style": "austin",
|
||||
"threshold": 0
|
||||
},
|
||||
"style": "diamond",
|
||||
"template": " {{ .FormattedMs }} ",
|
||||
"trailing_diamond": "\ue0b0",
|
||||
"type": "executiontime"
|
||||
}
|
||||
],
|
||||
"type": "prompt"
|
||||
},
|
||||
{
|
||||
"alignment": "right",
|
||||
"segments": [
|
||||
{
|
||||
"background": "magenta",
|
||||
"foreground": "black",
|
||||
"leading_diamond": "\ue0b2",
|
||||
"properties": {
|
||||
"branch_icon": "\ue725 ",
|
||||
"fetch_stash_count": true,
|
||||
"fetch_status": true,
|
||||
"fetch_upstream_icon": true,
|
||||
"fetch_worktree_count": true
|
||||
},
|
||||
"style": "diamond",
|
||||
"template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
|
||||
"trailing_diamond": "\ue0b0",
|
||||
"type": "git"
|
||||
}
|
||||
],
|
||||
"type": "prompt"
|
||||
},
|
||||
{
|
||||
"alignment": "left",
|
||||
"newline": true,
|
||||
"segments": [
|
||||
{
|
||||
"foreground": "cyan",
|
||||
"style": "plain",
|
||||
"template": " \u255a",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"background": "blue",
|
||||
"background_templates": ["{{ if gt .Code 0 }}red{{ end }}"],
|
||||
"foreground": "black",
|
||||
"leading_diamond": "\ue0b2",
|
||||
"properties": {
|
||||
"always_enabled": true
|
||||
},
|
||||
"style": "diamond",
|
||||
"template": "{{ if gt .Code 0 }} \uf7d3 {{ else }} \uf004{{ end }}",
|
||||
"type": "exit"
|
||||
},
|
||||
{
|
||||
"background": "blue",
|
||||
"foreground": "black",
|
||||
"powerline_symbol": "\ue0bc",
|
||||
"properties": {
|
||||
"folder_icon": "\uf07b",
|
||||
"folder_separator_icon": " \uf554 ",
|
||||
"home_icon": "\uf7db",
|
||||
"max_depth": 3,
|
||||
"style": "agnoster_short"
|
||||
},
|
||||
"style": "powerline",
|
||||
"template": "{{ if gt .Code 0 }} {{ else }}{{ end }}\ue5ff {{ .Path }} ",
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"background": "blue",
|
||||
"background_templates": ["{{ if .Root }}red{{ end }}"],
|
||||
"foreground": "white",
|
||||
"properties": {
|
||||
"root_icon": "\uf292"
|
||||
},
|
||||
"style": "diamond",
|
||||
"template": "{{ if .Root }} \uf0e7 {{ else }}\u0008{{ end }}",
|
||||
"trailing_diamond": "\ue0b0",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "prompt"
|
||||
}
|
||||
],
|
||||
"console_title_template": "{{ .Folder }}",
|
||||
"osc99": true,
|
||||
"palette": {
|
||||
"black": "#1B1A23",
|
||||
"blue": "#9580FF",
|
||||
"black-background": "#22212C",
|
||||
"lightBlue-brightBlue": "#AA99FF",
|
||||
"lightCyan-brightCyan": "#99FFEE",
|
||||
"lightGreen-brightGreen": "#A2FF99",
|
||||
"lightMagenta-brightPurple": "#FF99CC",
|
||||
"lightRed-brightRed": "#FFAA99",
|
||||
"lightWhite-brightWhite": "#FFFFFF",
|
||||
"lightYellow-brightYellow": "#FFFF80",
|
||||
"selection-selectionBackground": "#454158",
|
||||
"comment-brightBlack": "#7970A9",
|
||||
"cyan": "#80FFEA",
|
||||
"green": "#8AFF80",
|
||||
"magenta-purple": "#FF80BF",
|
||||
"red": "#FF9580",
|
||||
"white-cursorColor-foreground": "#F8F8F2",
|
||||
"yellow": "#FFCA80"
|
||||
},
|
||||
"version": 2
|
||||
}
|
241
themes/devious-diamonds.omp.yaml
Normal file
241
themes/devious-diamonds.omp.yaml
Normal file
|
@ -0,0 +1,241 @@
|
|||
# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
|
||||
blocks:
|
||||
- type: prompt
|
||||
alignment: left
|
||||
newline: true
|
||||
segments:
|
||||
- type: iterm
|
||||
style: plain
|
||||
foreground: cyan
|
||||
template: "{{ .PromptMark }}"
|
||||
- type: os
|
||||
style: diamond
|
||||
trailing_diamond: <transparent,></>
|
||||
foreground: cyan
|
||||
properties:
|
||||
alpine:
|
||||
arch:
|
||||
centos:
|
||||
debian:
|
||||
elementary:
|
||||
fedora:
|
||||
gentoo:
|
||||
linux:
|
||||
macos:
|
||||
manjaro:
|
||||
mint:
|
||||
opensuse:
|
||||
raspbian:
|
||||
ubuntu:
|
||||
windows:
|
||||
wsl:
|
||||
wsl_separator:
|
||||
template: " {{ if .WSL }}{{ end }}{{.Icon}}═"
|
||||
- type: shell
|
||||
style: diamond
|
||||
leading_diamond:
|
||||
background: green
|
||||
foreground: black
|
||||
template: " {{ .Name }} "
|
||||
- type: session
|
||||
style: powerline
|
||||
powerline_symbol:
|
||||
background: magenta
|
||||
foreground: black
|
||||
template: " {{ if .SSHSession }} {{ end }}{{ .UserName }}@{{ .HostName }} "
|
||||
- type: angular
|
||||
style: powerline
|
||||
powerline_symbol:
|
||||
background: lightRed
|
||||
foreground: black
|
||||
properties:
|
||||
fetch_version: true
|
||||
template: " ﮰ {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
|
||||
- type: aws
|
||||
style: powerline
|
||||
powerline_symbol:
|
||||
background: yellow
|
||||
foreground: black
|
||||
properties:
|
||||
display_default: false
|
||||
template: " {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} "
|
||||
- type: az
|
||||
style: powerline
|
||||
powerline_symbol:
|
||||
background: lightBlue
|
||||
foreground: black
|
||||
properties:
|
||||
display_default: false
|
||||
template: " ﴃ Subscription {{ .Name }} ({{ if .EnvironmentName | contains 'AzureCloud' }}{{ 'Global' }}{{ else }}{{ .EnvironmentName }}{{ end }}) "
|
||||
- type: azfunc
|
||||
style: powerline
|
||||
powerline_symbol:
|
||||
background: yellow
|
||||
foreground: black
|
||||
properties:
|
||||
display_mode: files
|
||||
fetch_version: false
|
||||
template: " ﴃ {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
|
||||
- type: go
|
||||
style: powerline
|
||||
powerline_symbol:
|
||||
background: lightCyan
|
||||
foreground: black
|
||||
properties:
|
||||
fetch_version: true
|
||||
template: " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
|
||||
- type: java
|
||||
style: powerline
|
||||
powerline_symbol:
|
||||
background: lightCyan
|
||||
foreground: black
|
||||
template: " {{ .Full }}"
|
||||
- type: julia
|
||||
style: powerline
|
||||
powerline_symbol:
|
||||
background: lightCyan
|
||||
foreground: black
|
||||
properties:
|
||||
fetch_version: true
|
||||
template: " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
|
||||
- type: kubectl
|
||||
style: powerline
|
||||
powerline_symbol:
|
||||
background: lightYellow
|
||||
foreground: black
|
||||
template: " ﴱ {{.Context}}{{if .Namespace}} :: {{.Namespace}}{{end}} "
|
||||
- type: node
|
||||
style: powerline
|
||||
powerline_symbol:
|
||||
background: lightGreen
|
||||
foreground: black
|
||||
properties:
|
||||
fetch_version: true
|
||||
template: " {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} "
|
||||
- type: php
|
||||
style: powerline
|
||||
powerline_symbol:
|
||||
background: lightCyan
|
||||
foreground: black
|
||||
template: " {{ .Full }} "
|
||||
- type: project
|
||||
style: powerline
|
||||
powerline_symbol:
|
||||
background: lightYellow
|
||||
foreground: black
|
||||
template: " {{ if .Error }}{{ .Error }}{{ else }}{{ if .Version }} {{.Version}}{{ end }} {{ if .Name }}{{ .Name }}{{ end }}{{ end }} "
|
||||
- type: python
|
||||
style: powerline
|
||||
powerline_symbol:
|
||||
background: lightYellow
|
||||
foreground: black
|
||||
properties:
|
||||
display_mode: files
|
||||
fetch_virtual_env: false
|
||||
template: " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
|
||||
- type: ruby
|
||||
style: powerline
|
||||
powerline_symbol:
|
||||
background: red
|
||||
foreground: black
|
||||
properties:
|
||||
display_mode: files
|
||||
fetch_version: true
|
||||
template: " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
|
||||
- type: time
|
||||
style: powerline
|
||||
powerline_symbol:
|
||||
background: yellow
|
||||
foreground: black
|
||||
properties:
|
||||
time_format: Mon | 15:04:05
|
||||
template: " {{ .CurrentDate | date .Format }} "
|
||||
- type: executiontime
|
||||
style: diamond
|
||||
trailing_diamond:
|
||||
background: cyan
|
||||
foreground: black
|
||||
properties:
|
||||
style: austin
|
||||
threshold: 0
|
||||
template: " {{ .FormattedMs }} "
|
||||
- type: prompt
|
||||
alignment: right
|
||||
segments:
|
||||
- type: git
|
||||
style: diamond
|
||||
leading_diamond:
|
||||
trailing_diamond:
|
||||
background: magenta
|
||||
foreground: black
|
||||
properties:
|
||||
branch_icon: " "
|
||||
fetch_stash_count: true
|
||||
fetch_status: true
|
||||
fetch_upstream_icon: true
|
||||
fetch_worktree_count: true
|
||||
template: "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} {{ .StashCount }}{{ end }}"
|
||||
- type: prompt
|
||||
alignment: left
|
||||
newline: true
|
||||
segments:
|
||||
- type: text
|
||||
style: plain
|
||||
foreground: cyan
|
||||
template: " ╚"
|
||||
- type: exit
|
||||
style: diamond
|
||||
leading_diamond:
|
||||
background: blue
|
||||
background_templates:
|
||||
- "{{ if gt .Code 0 }}red{{ end }}"
|
||||
foreground: black
|
||||
properties:
|
||||
always_enabled: true
|
||||
template: " {{ if gt .Code 0 }}{{ else }}{{ end }}{{ if eq ( gt .Code 0 ) .Segments.Path.Writable}} {{ end }}"
|
||||
- type: path
|
||||
style: powerline
|
||||
powerline_symbol:
|
||||
background: blue
|
||||
background_templates:
|
||||
- "{{ if not .Writable }}red{{ end }}"
|
||||
foreground: black
|
||||
properties:
|
||||
style: agnoster_short
|
||||
folder_icon:
|
||||
folder_separator_icon: " "
|
||||
home_icon:
|
||||
max_depth: 3
|
||||
template: "{{ if eq ( gt .Code 0 ) .Writable }} {{ end }} {{ .Path }}{{ if not .Writable }} {{ end }}"
|
||||
- type: text
|
||||
style: diamond
|
||||
trailing_diamond:
|
||||
background: blue
|
||||
background_templates:
|
||||
- "{{ if and .Segments.Path.Writable (not .Root) }}{{ else }}red{{ end }}"
|
||||
foreground: white
|
||||
properties:
|
||||
root_icon:
|
||||
template: "{{ if and .Root ( not .Segments.Path.Writable ) }} {{ end }}{{ if and .Root .Segments.Path.Writable }} {{ end }} \b"
|
||||
console_title_template: "{{ .Folder }}"
|
||||
osc99: true
|
||||
palette:
|
||||
black: "#1B1A23"
|
||||
blue: "#9580FF"
|
||||
black-background: "#22212C"
|
||||
lightBlue-brightBlue: "#AA99FF"
|
||||
lightCyan-brightCyan: "#99FFEE"
|
||||
lightGreen-brightGreen: "#A2FF99"
|
||||
lightMagenta-brightPurple: "#FF99CC"
|
||||
lightRed-brightRed: "#FFAA99"
|
||||
lightWhite-brightWhite: "#FFFFFF"
|
||||
lightYellow-brightYellow: "#FFFF80"
|
||||
selection-selectionBackground: "#454158"
|
||||
comment-brightBlack: "#7970A9"
|
||||
cyan: "#80FFEA"
|
||||
green: "#8AFF80"
|
||||
magenta-purple: "#FF80BF"
|
||||
red: "#FF9580"
|
||||
white-cursorColor-foreground: "#F8F8F2"
|
||||
yellow: "#FFCA80"
|
||||
version: 2
|
Loading…
Reference in a new issue