Skip to content

Instantly share code, notes, and snippets.

@hideki0403
Last active May 12, 2023 04:29
Show Gist options
  • Save hideki0403/57cb76099c3cacc4cf3d3c06d9adca6a to your computer and use it in GitHub Desktop.
Save hideki0403/57cb76099c3cacc4cf3d3c06d9adca6a to your computer and use it in GitHub Desktop.
Oh My Posh: bash style theme
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"version": 2,
"final_space": true,
"console_title_template": "{{ .UserName }}@{{ .HostName }}:{{ .PWD }}",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "session",
"style": "plain",
"foreground": "green",
"template": "{{ .UserName }}@{{ .HostName }}"
},
{
"type": "text",
"style": "plain",
"foreground": "white",
"template": ": "
},
{
"type": "path",
"style": "plain",
"foreground": "cyan",
"template": "{{ .Path }}",
"properties": {
"style": "agnoster_full",
"folder_separator_icon": "/"
}
},
{
"type": "exit",
"style": "plain",
"foreground": "red",
"template": "{{ if ne .Code 0 }} ✕ {{ end }}"
}
]
},
{
"type": "prompt",
"alignment": "right",
"segments": [
{
"type": "time",
"style": "plain",
"foreground": "darkGray"
},
{
"type": "executiontime",
"style": "plain",
"foreground": "darkGray",
"template": "({{ .FormattedMs }})",
"properties": {
"style": "round",
"always_enabled": true
}
}
]
},
{
"type": "prompt",
"alignment": "left",
"newline": true,
"segments": [
{
"type": "text",
"style": "plain",
"foreground": "white",
"template": "{{ if .Root }}#{{ else }}${{ end }}"
}
]
}
]
}
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"version": 2,
"final_space": true,
"console_title_template": "{{ .UserName }}@{{ .HostName }}:{{ .PWD }}",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "session",
"style": "plain",
"foreground": "green",
"template": "{{ .UserName }}@{{ .HostName }}"
},
{
"type": "text",
"style": "plain",
"foreground": "white",
"template": ":"
},
{
"type": "path",
"style": "plain",
"foreground": "cyan",
"template": "{{ .Path }}",
"properties": {
"style": "agnoster_full",
"folder_separator_icon": "/"
}
},
{
"type": "text",
"style": "plain",
"foreground": "white",
"template": "{{ if .Root }}#{{ else }}${{ end }}"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment