use same shell setup as in nix home manager
This commit is contained in:
113
roles/pi_modern_shell_env/files/ohmyposh.json
Normal file
113
roles/pi_modern_shell_env/files/ohmyposh.json
Normal file
@@ -0,0 +1,113 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
||||
"blocks": [
|
||||
{
|
||||
"alignment": "left",
|
||||
"segments": [
|
||||
{
|
||||
"background_templates": [
|
||||
"{{ if eq .Env.FISH__BIND_MODE \"insert\" }}#735CDD{{ else }}#78E425{{ end }}"
|
||||
],
|
||||
"foreground": "#ffffff",
|
||||
"powerline_symbol": "\ue0b8",
|
||||
"style": "diamond",
|
||||
"leading_diamond": "\ue0b6",
|
||||
"type": "text",
|
||||
"template": "{{ if eq .Env.FISH__BIND_MODE \"default\" }}N {{ else if eq .Env.FISH__BIND_MODE \"insert\" }}I {{ else if eq .Env.FISH__BIND_MODE \"replace_one\" }}R {{ else if eq .Env.FISH__BIND_MODE \"visual\"}}V {{ else }}<red>[?]</>{{ end }}"
|
||||
},
|
||||
{
|
||||
"type": "session",
|
||||
"style": "powerline",
|
||||
"powerline_symbol": "\ue0b0",
|
||||
"background": "#735CDD",
|
||||
"foreground": "#bbbbbb",
|
||||
"template": "{{ if .SSHSession }}{{ .HostName }} {{ end }}",
|
||||
"properties": {
|
||||
"display_host": true,
|
||||
"ssh_icon": "\ueb03"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "python",
|
||||
"style": "powerline",
|
||||
"powerline_symbol": "",
|
||||
"foreground": "#100e23",
|
||||
"background": "#906cff",
|
||||
"template": " {{ .Venv }} "
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"style": "powerline",
|
||||
"powerline_symbol": "\ue0b0",
|
||||
"foreground": "#100e23",
|
||||
"background": "#7EBAE4",
|
||||
"template": "{{ if .Env.IN_NIX_SHELL }} \uf313 {{ .Env.IN_NIX_SHELL }} {{ end }}"
|
||||
},
|
||||
{
|
||||
"background": "#DA627D",
|
||||
"foreground": "#ffffff",
|
||||
"powerline_symbol": "\ue0b0",
|
||||
"properties": {
|
||||
"folder_icon": "\uf115",
|
||||
"home_icon": "\ueb06",
|
||||
"style": "full",
|
||||
"mapped_locations": {
|
||||
"/workspaces/sgrid": ""
|
||||
}
|
||||
},
|
||||
"template": " {{ .Path }} ",
|
||||
"type": "path",
|
||||
"style": "diamond",
|
||||
"trailing_diamond": ""
|
||||
}
|
||||
],
|
||||
"type": "prompt"
|
||||
},
|
||||
{
|
||||
"alignment": "right",
|
||||
"segments": [
|
||||
{
|
||||
"background": "#ee79d1",
|
||||
"foreground": "#000000",
|
||||
"style": "diamond",
|
||||
"leading_diamond": "",
|
||||
"trailing_diamond": "",
|
||||
"properties": {
|
||||
"branch_icon": "\ue725 ",
|
||||
"fetch_stash_count": true,
|
||||
"fetch_status": true,
|
||||
"fetch_upstream_icon": true,
|
||||
"fetch_worktree_count": true
|
||||
},
|
||||
"template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ 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 }} \ueb4b {{ .StashCount }}{{ end }} ",
|
||||
"type": "git"
|
||||
},
|
||||
{
|
||||
"background": "#db5f32",
|
||||
"foreground": "#cdf3f4",
|
||||
"style": "diamond",
|
||||
"leading_diamond": "",
|
||||
"trailing_diamond": "",
|
||||
"properties": {
|
||||
"threshold": 500,
|
||||
"style": "austin"
|
||||
},
|
||||
"template": " \ueba2 {{ .FormattedMs }} ",
|
||||
"type": "executiontime"
|
||||
},
|
||||
{
|
||||
"background": "#db5f32",
|
||||
"foreground": "#ffffff",
|
||||
"template": " \uf421 {{.Code}}",
|
||||
"style": "diamond",
|
||||
"leading_diamond": "",
|
||||
"trailing_diamond": "",
|
||||
"type": "status"
|
||||
}
|
||||
],
|
||||
"type": "rprompt"
|
||||
}
|
||||
],
|
||||
"final_space": true,
|
||||
"version": 3
|
||||
}
|
||||
Reference in New Issue
Block a user