Created
December 17, 2021 21:58
-
-
Save DamianRivas/b4cb8c52032e49325e753989643566d1 to your computer and use it in GitHub Desktop.
Powershell Config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"final_space": false, | |
"osc99": true, | |
"blocks": [ | |
{ | |
"type": "prompt", | |
"alignment": "left", | |
"segments": [ | |
{ | |
"type": "shell", | |
"style": "diamond", | |
"leading_diamond": "╭─", | |
"trailing_diamond": "", | |
"foreground": "#ffffff", | |
"background": "#0f3781", | |
"properties": {} | |
}, | |
{ | |
"type": "root", | |
"style": "diamond", | |
"leading_diamond": "", | |
"trailing_diamond": "", | |
"foreground": "#38fff5", | |
"background": "#ef5050", | |
"properties": { | |
"root_icon": "\uf292", | |
"prefix": "<parentBackground>\uE0B0</> " | |
} | |
}, | |
{ | |
"type": "path", | |
"style": "powerline", | |
"powerline_symbol": "\uE0B0", | |
"foreground": "#E4E4E4", | |
"background": "#383846", | |
"properties": { | |
"style": "full", | |
"enable_hyperlink": true | |
} | |
}, | |
{ | |
"type": "git", | |
"style": "powerline", | |
"powerline_symbol": "\uE0B0", | |
"foreground": "#011627", | |
"background": "#38ffbd", | |
"background_templates": [ | |
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ffeb95{{ end }}", | |
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#c5e478{{ end }}", | |
"{{ if gt .Ahead 0 }}#C792EA{{ end }}", | |
"{{ if gt .Behind 0 }}#C792EA{{ end }}" | |
], | |
"properties": { | |
"branch_icon": "\ue725 ", | |
"fetch_status": true, | |
"fetch_upstream_icon": true, | |
"template": "{{ .HEAD }} {{ if .Working.Changed }}{{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#ef5350> \uF046 {{ .Staging.String }}</>{{ end }}" | |
} | |
} | |
] | |
}, | |
{ | |
"type": "prompt", | |
"alignment": "right", | |
"segments": [ | |
{ | |
"type": "node", | |
"style": "diamond", | |
"leading_diamond": " \uE0B6", | |
"trailing_diamond": "\uE0B4", | |
"foreground": "#3C873A", | |
"background": "#383846", | |
"properties": { | |
"prefix": "\uE718 ", | |
"postfix": "", | |
"display_package_manager": true, | |
"yarn_icon": " <#348cba></>", | |
"npm_icon": " <#cc3a3a></> " | |
} | |
}, | |
{ | |
"type": "time", | |
"style": "diamond", | |
"invert_powerline": true, | |
"leading_diamond": " \uE0B6", | |
"trailing_diamond": "\uE0B4", | |
"background": "#304897", | |
"foreground": "#ffffff", | |
"properties": { | |
"prefix": " \uf5ef ", | |
"postfix": " " | |
} | |
} | |
] | |
}, | |
{ | |
"type": "prompt", | |
"alignment": "left", | |
"newline": true, | |
"segments": [ | |
{ | |
"type": "text", | |
"style": "plain", | |
"foreground": "#304897", | |
"properties": { | |
"prefix": "", | |
"postfix": "", | |
"text": "╰─" | |
} | |
}, | |
{ | |
"type": "exit", | |
"style": "plain", | |
"foreground": "#e0f9ff", | |
"properties": { | |
"prefix": "\u276F", | |
"display_exit_code": false, | |
"always_enabled": true, | |
"error_color": "#ef5350" | |
} | |
} | |
] | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prompt | |
Import-Module posh-git | |
Import-Module oh-my-posh | |
# Load prompt config | |
function Get-ScriptDirectory { Split-Path $MyInvocation.ScriptName } | |
$PROMPT_CONFIG = Join-Path (Get-ScriptDirectory) 'damian.omp.json' | |
oh-my-posh --init --shell pwsh --config $PROMPT_CONFIG | Invoke-Expression | |
# Icons | |
Import-Module -Name Terminal-Icons | |
# Alias | |
Set-Alias vim nvim | |
Set-Alias ll ls | |
Set-Alias g git | |
Set-Alias grep findstr | |
Set-Alias tig "C:\Program Files\Git\usr\bin\tig.exe" | |
Set-Alias less "C:\Program Files\Git\usr\bin\less.exe" | |
Set-Alias find "C:\Program Files\Git\usr\bin\find.exe" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment