oh-my-posh/website/docs/configuration/example.mdx

96 lines
2.5 KiB
Plaintext
Raw Normal View History

---
2022-04-20 09:43:59 -07:00
id: sample
title: Sample
sidebar_label: Sample
---
2023-03-31 11:55:36 -07:00
import Config from '@site/src/components/Config.js';
2022-06-03 13:35:11 -07:00
2023-03-31 11:55:36 -07:00
<Config data={{
2022-02-02 10:38:31 -08:00
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"segments": [
{
"foreground": "#007ACC",
2022-03-27 01:12:47 -07:00
"template": " {{ .CurrentDate | date .Format }} ",
"properties": {
"time_format": "15:04:05"
2022-02-02 10:38:31 -08:00
},
"style": "plain",
"type": "time"
}
2022-02-02 10:38:31 -08:00
],
2022-07-03 01:54:52 -07:00
"type": "rprompt",
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"background": "#ffb300",
2022-02-02 10:38:31 -08:00
"foreground": "#ffffff",
"leading_diamond": "\ue0b6",
2022-03-27 01:12:47 -07:00
"template": " {{ .UserName }} ",
2022-02-02 10:38:31 -08:00
"style": "diamond",
"trailing_diamond": "\ue0b0",
"type": "session"
},
{
"background": "#61AFEF",
2022-02-02 10:38:31 -08:00
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
2022-03-27 01:12:47 -07:00
"template": " {{ .Path }} ",
"properties": {
"exclude_folders": [
"/super/secret/project"
2022-02-02 10:38:31 -08:00
],
2022-03-27 01:12:47 -07:00
"style": "folder"
2022-02-02 10:38:31 -08:00
},
"style": "powerline",
"type": "path"
},
{
"background": "#2e9599",
"background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}#f36943{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#a8216b{{ end }}",
"{{ if gt .Ahead 0 }}#35b5ff{{ end }}",
"{{ if gt .Behind 0 }}#f89cfa{{ end }}"
],
2022-02-02 10:38:31 -08:00
"foreground": "#193549",
"foreground_templates": [
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ffffff{{ end }}"
],
"powerline_symbol": "\ue0b0",
"template": " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }} ",
"properties": {
"branch_max_length": 25,
2022-03-27 01:12:47 -07:00
"fetch_status": true
2022-02-02 10:38:31 -08:00
},
"style": "powerline",
"type": "git"
},
{
"background": "#00897b",
2022-02-02 10:38:31 -08:00
"background_templates": [
"{{ if gt .Code 0 }}#e91e63{{ end }}"
],
"foreground": "#ffffff",
2022-03-27 01:12:47 -07:00
"template": "<parentBackground>\ue0b0</> \ue23a ",
"properties": {
2022-03-27 01:12:47 -07:00
"always_enabled": true
2022-02-02 10:38:31 -08:00
},
"style": "diamond",
"trailing_diamond": "\ue0b4",
"type": "status"
}
2022-02-02 10:38:31 -08:00
],
"type": "prompt"
}
2022-02-02 10:38:31 -08:00
],
"final_space": true,
2022-03-27 01:12:47 -07:00
"version": 2
2023-03-31 11:55:36 -07:00
}}/>
2022-06-03 13:35:11 -07:00