rprompt on first line #3207
Answered
by
JanDeDobbeleer
Chucky2401
asked this question in
Troubleshoot
-
Beta Was this translation helpful? Give feedback.
Answered by
JanDeDobbeleer
Dec 16, 2022
Replies: 2 comments 2 replies
-
@Chucky2401 you need to make the last rprompt block the second one and make it a regular prompt block which is right aligned. {
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"foreground": "cyan",
"properties": {
"template": "\ue70f"
},
"style": "powerline",
"type": "os"
},
{
"background": "transparent",
"foreground": "#16C60C",
"properties": {
"style": "full"
},
"style": "plain",
"template": " {{ if .SSHSession }}\uf817 {{ end }}TBW@{{ .HostName }}:",
"trailing_diamond": ":",
"type": "session"
},
{
"background": "transparent",
"foreground": "#3B78FF",
"properties": {
"folder_icon": "\uf115 ",
"folder_separator_icon": "\\",
"home_icon": "\uf7db ",
"max_depth": 3,
"style": "agnoster_short",
"mapped_locations": {
"D:/Utilisateurs/TheBlackWizard/Jeux/Backup/Playnite/Scripts/Restic-Scripts": "\uF09B Restic",
"E:/Games/Minecraft/#Setup_Minecraft/#Scripts/Minecraft-Mods": "\uF09B Minecraft"
}
},
"style": "powerline",
"template": " {{ .Path }} $",
"type": "path"
},
{
"background": "#95ffa4",
"foreground": "#193549",
"powerline_symbol": "\ue0b0",
"style": "powerline",
"template": " {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} \uf692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }} ",
"type": "git"
},
{
"background": "#FF6471",
"foreground": "#ffffff",
"style": "diamond",
"template": "<transparent>\ue0b0 </>{{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }} ",
"trailing_diamond": "\ue0b4",
"type": "python"
}
],
"type": "prompt"
},
{
"type": "prompt",
"alignment": "right",
"segments": [
{
"background": "#83769c",
"foreground": "#ffffff",
"properties": {
"always_enabled": true
},
"style": "diamond",
"template": " {{ .FormattedMs }} ",
"trailing_diamond": " ",
"type": "executiontime",
"min_width": 95
},
{
"background": "#0077c2",
"foreground": "#ffffff",
"style": "plain",
"template": "[{{ .Name }} ({{ .Version }})]",
"type": "shell",
"min_width": 89
},
{
"background": "#2e9599",
"foreground": "#111111",
"invert_powerline": true,
"leading_diamond": " ",
"style": "diamond",
"template": " {{ .CurrentDate | date .Format }} ",
"type": "time",
"min_width": 74
}
]
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "green",
"properties": {
"always_enabled": true
},
"template": "\uf061 ",
"style": "powerline",
"type": "exit"
}
],
"type": "prompt"
}
],
"final_space": true,
"version": 2
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Chucky2401
-
Is it possible to achieve the same result with a |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Chucky2401 you need to make the last rprompt block the second one and make it a regular prompt block which is right aligned.