Skip to content

Instantly share code, notes, and snippets.

@shibbirweb
Created August 11, 2022 03:35
Show Gist options
  • Select an option

  • Save shibbirweb/e8e96eac25fc13ebbd908cf737bb70c1 to your computer and use it in GitHub Desktop.

Select an option

Save shibbirweb/e8e96eac25fc13ebbd908cf737bb70c1 to your computer and use it in GitHub Desktop.
PowerShell 7 Settings
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\sim-web.omp.json" | Invoke-Expression
Import-Module -Name Terminal-Icons
Import-Module -Name PSReadLine
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -PredictionViewStyle ListView
Set-PSReadLineOption -EditMode Windows
# Import the Chocolatey Profile that contains the necessary code to enable
# tab-completions to function for `choco`.
# Be aware that if you are missing these lines from your profile, tab completion
# for `choco` will not function.
# See https://ch0.co/tab-completion for details.
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module "$ChocolateyProfile"
}
Import-Module posh-git
$ENV:STARSHIP_CONFIG = "$HOME\.config\starship.toml"
$ENV:STARSHIP_DISTRO = "者 $env:username"
Invoke-Expression (&starship init powershell)
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command": "paste",
"keys": "ctrl+v"
},
{
"command":
{
"action": "copy",
"singleLine": false
},
"keys": "ctrl+c"
},
{
"command": "find",
"keys": "ctrl+shift+f"
},
{
"command":
{
"action": "splitPane",
"split": "auto",
"splitMode": "duplicate"
},
"keys": "alt+shift+d"
}
],
"alwaysShowNotificationIcon": false,
"copyFormatting": "none",
"copyOnSelect": true,
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"profiles":
{
"defaults":
{
"backgroundImage": null,
"colorScheme": "One Half Dark (Modded)",
"elevate": true,
"experimental.retroTerminalEffect": false,
"font":
{
"face": "JetBrainsMono Nerd Font Mono"
},
"opacity": 65,
"useAcrylic": true
},
"list":
[
{
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"hidden": false,
"name": "Windows PowerShell",
"startingDirectory": null
},
{
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"hidden": false,
"name": "Command Prompt",
"startingDirectory": null
},
{
"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
"hidden": false,
"name": "Azure Cloud Shell",
"source": "Windows.Terminal.Azure",
"startingDirectory": null
},
{
"antialiasingMode": "grayscale",
"commandline": "\"%PROGRAMFILES%\\Git\\usr\\bin\\bash.exe\" --login -i -l",
"font":
{
"face": "JetBrainsMono Nerd Font Mono"
},
"guid": "{00000000-0000-0000-0000-000000000001}",
"historySize": 9001,
"icon": "%PROGRAMFILES%\\Git\\mingw64\\share\\git\\git-for-windows.ico",
"name": "GitBash",
"startingDirectory": null,
"suppressApplicationTitle": true,
"tabTitle": "Git Bash"
},
{
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"hidden": false,
"name": "PowerShell",
"source": "Windows.Terminal.PowershellCore",
"startingDirectory": null
}
]
},
"schemes":
[
{
"background": "#0C0C0C",
"black": "#0C0C0C",
"blue": "#0037DA",
"brightBlack": "#767676",
"brightBlue": "#3B78FF",
"brightCyan": "#61D6D6",
"brightGreen": "#16C60C",
"brightPurple": "#B4009E",
"brightRed": "#E74856",
"brightWhite": "#F2F2F2",
"brightYellow": "#F9F1A5",
"cursorColor": "#FFFFFF",
"cyan": "#3A96DD",
"foreground": "#CCCCCC",
"green": "#13A10E",
"name": "Campbell",
"purple": "#881798",
"red": "#C50F1F",
"selectionBackground": "#FFFFFF",
"white": "#CCCCCC",
"yellow": "#C19C00"
},
{
"background": "#012456",
"black": "#0C0C0C",
"blue": "#0037DA",
"brightBlack": "#767676",
"brightBlue": "#3B78FF",
"brightCyan": "#61D6D6",
"brightGreen": "#16C60C",
"brightPurple": "#B4009E",
"brightRed": "#E74856",
"brightWhite": "#F2F2F2",
"brightYellow": "#F9F1A5",
"cursorColor": "#FFFFFF",
"cyan": "#3A96DD",
"foreground": "#CCCCCC",
"green": "#13A10E",
"name": "Campbell Powershell",
"purple": "#881798",
"red": "#C50F1F",
"selectionBackground": "#FFFFFF",
"white": "#CCCCCC",
"yellow": "#C19C00"
},
{
"background": "#282C34",
"black": "#282C34",
"blue": "#61AFEF",
"brightBlack": "#5A6374",
"brightBlue": "#61AFEF",
"brightCyan": "#56B6C2",
"brightGreen": "#98C379",
"brightPurple": "#C678DD",
"brightRed": "#E06C75",
"brightWhite": "#DCDFE4",
"brightYellow": "#E5C07B",
"cursorColor": "#FFFFFF",
"cyan": "#56B6C2",
"foreground": "#DCDFE4",
"green": "#98C379",
"name": "One Half Dark",
"purple": "#C678DD",
"red": "#E06C75",
"selectionBackground": "#FFFFFF",
"white": "#DCDFE4",
"yellow": "#E5C07B"
},
{
"background": "#001B26",
"black": "#282C34",
"blue": "#61AFEF",
"brightBlack": "#5A6374",
"brightBlue": "#61AFEF",
"brightCyan": "#56B6C2",
"brightGreen": "#98C379",
"brightPurple": "#C678DD",
"brightRed": "#E06C75",
"brightWhite": "#DCDFE4",
"brightYellow": "#E5C07B",
"cursorColor": "#FFFFFF",
"cyan": "#56B6C2",
"foreground": "#DCDFE4",
"green": "#98C379",
"name": "One Half Dark (Modded)",
"purple": "#C678DD",
"red": "#E06C75",
"selectionBackground": "#FFFFFF",
"white": "#DCDFE4",
"yellow": "#E5C07B"
},
{
"background": "#FAFAFA",
"black": "#383A42",
"blue": "#0184BC",
"brightBlack": "#4F525D",
"brightBlue": "#61AFEF",
"brightCyan": "#56B5C1",
"brightGreen": "#98C379",
"brightPurple": "#C577DD",
"brightRed": "#DF6C75",
"brightWhite": "#FFFFFF",
"brightYellow": "#E4C07A",
"cursorColor": "#4F525D",
"cyan": "#0997B3",
"foreground": "#383A42",
"green": "#50A14F",
"name": "One Half Light",
"purple": "#A626A4",
"red": "#E45649",
"selectionBackground": "#FFFFFF",
"white": "#FAFAFA",
"yellow": "#C18301"
},
{
"background": "#002B36",
"black": "#002B36",
"blue": "#268BD2",
"brightBlack": "#073642",
"brightBlue": "#839496",
"brightCyan": "#93A1A1",
"brightGreen": "#586E75",
"brightPurple": "#6C71C4",
"brightRed": "#CB4B16",
"brightWhite": "#FDF6E3",
"brightYellow": "#657B83",
"cursorColor": "#FFFFFF",
"cyan": "#2AA198",
"foreground": "#839496",
"green": "#859900",
"name": "Solarized Dark",
"purple": "#D33682",
"red": "#DC322F",
"selectionBackground": "#FFFFFF",
"white": "#EEE8D5",
"yellow": "#B58900"
},
{
"background": "#FDF6E3",
"black": "#002B36",
"blue": "#268BD2",
"brightBlack": "#073642",
"brightBlue": "#839496",
"brightCyan": "#93A1A1",
"brightGreen": "#586E75",
"brightPurple": "#6C71C4",
"brightRed": "#CB4B16",
"brightWhite": "#FDF6E3",
"brightYellow": "#657B83",
"cursorColor": "#002B36",
"cyan": "#2AA198",
"foreground": "#657B83",
"green": "#859900",
"name": "Solarized Light",
"purple": "#D33682",
"red": "#DC322F",
"selectionBackground": "#FFFFFF",
"white": "#EEE8D5",
"yellow": "#B58900"
},
{
"background": "#000000",
"black": "#000000",
"blue": "#3465A4",
"brightBlack": "#555753",
"brightBlue": "#729FCF",
"brightCyan": "#34E2E2",
"brightGreen": "#8AE234",
"brightPurple": "#AD7FA8",
"brightRed": "#EF2929",
"brightWhite": "#EEEEEC",
"brightYellow": "#FCE94F",
"cursorColor": "#FFFFFF",
"cyan": "#06989A",
"foreground": "#D3D7CF",
"green": "#4E9A06",
"name": "Tango Dark",
"purple": "#75507B",
"red": "#CC0000",
"selectionBackground": "#FFFFFF",
"white": "#D3D7CF",
"yellow": "#C4A000"
},
{
"background": "#FFFFFF",
"black": "#000000",
"blue": "#3465A4",
"brightBlack": "#555753",
"brightBlue": "#729FCF",
"brightCyan": "#34E2E2",
"brightGreen": "#8AE234",
"brightPurple": "#AD7FA8",
"brightRed": "#EF2929",
"brightWhite": "#EEEEEC",
"brightYellow": "#FCE94F",
"cursorColor": "#000000",
"cyan": "#06989A",
"foreground": "#555753",
"green": "#4E9A06",
"name": "Tango Light",
"purple": "#75507B",
"red": "#CC0000",
"selectionBackground": "#FFFFFF",
"white": "#D3D7CF",
"yellow": "#C4A000"
},
{
"background": "#000000",
"black": "#000000",
"blue": "#000080",
"brightBlack": "#808080",
"brightBlue": "#0000FF",
"brightCyan": "#00FFFF",
"brightGreen": "#00FF00",
"brightPurple": "#FF00FF",
"brightRed": "#FF0000",
"brightWhite": "#FFFFFF",
"brightYellow": "#FFFF00",
"cursorColor": "#FFFFFF",
"cyan": "#008080",
"foreground": "#C0C0C0",
"green": "#008000",
"name": "Vintage",
"purple": "#800080",
"red": "#800000",
"selectionBackground": "#FFFFFF",
"white": "#C0C0C0",
"yellow": "#808000"
}
],
"useAcrylicInTabRow": true
}
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"type": "prompt",
"alignment": "right",
"overflow": "hide",
"segments": [
{
"type": "executiontime",
"style": "powerline",
"foreground": "#a9ffb4",
"template": " {{ .FormattedMs }}s <#ffffff>\ue601</>",
"properties": {
"threshold": 0,
"style": "dallas"
}
},
{
"type": "node",
"style": "powerline",
"foreground": "#45bf17",
"template": " \ue718 {{ .Full }} "
},
{
"type": "npm",
"style": "powerline",
"foreground": "#FE4A49",
"template": "<#F3EFF5>and</> \ue71e {{ .Full }} "
}
]
},
{
"type": "prompt",
"alignment": "left",
"newline": true,
"overflow": "break",
"segments": [
{
"type": "path",
"style": "powerline",
"foreground": "#ffafd2",
"properties": {
"style": "agnoster_full",
"home_icon": "home",
"folder_icon": "\uf07b",
"folder_separator_icon": " \u276f "
},
"template": "\ue5ff {{ .Path }} "
},
{
"type": "git",
"style": "powerline",
"foreground": "#f14e32",
"properties": {
"branch_icon": "\ue725 "
},
"template": "({{ .HEAD }})"
}
]
},
{
"alignment": "left",
"newline": true,
"type": "prompt",
"segments": [
{
"type": "exit",
"style": "diamond",
"foreground": "#00c7fc",
"properties": {
"always_enabled": true
},
"template": "<#00c7fc>\u276f</>_: "
}
]
}
],
"console_title_template": "{{ .Folder }}",
"transient_prompt": {
"background": "transparent",
"foreground": "#FEF5ED",
"template": "{{ .Shell }}"
},
"version": 2
}
# ~/.config/starship.toml
# Inserts a blank line between shell prompts
add_newline = true
# Change command timeout from 500 to 1000 ms
command_timeout = 1000
# Change the default prompt format
format = """\
[╭╴](238)$env_var\
$all[╰─](238)$character"""
#
# Change the default prompt characters
[character]
success_symbol = "[](238)"
error_symbol = "[](238)"
# Shows an icon that should be included by zshrc script based on the distribution or os
[env_var.STARSHIP_DISTRO]
format = '[$env_value](white) '
variable = "STARSHIP_DISTRO"
disabled = false
# Shows the username
[username]
style_user = "white"
style_root = "white"
format = "[$user]($style) "
disabled = true
show_always = true
[hostname]
ssh_only = false
format = "on [$hostname](bold yellow) "
disabled = false
[directory]
truncation_length = 3
truncation_symbol = "…/"
home_symbol = " ~"
read_only_style = "197"
read_only = "  "
format = "at [$path]($style)[$read_only]($read_only_style) "
[git_branch]
symbol = " "
format = "via [$symbol$branch]($style) "
# truncation_length = 4
truncation_symbol = "…/"
style = "bold green"
[git_status]
format = '[\($all_status$ahead_behind\)]($style) '
style = "bold green"
conflicted = "🏳"
up_to_date = " "
untracked = " "
ahead = "⇡${count}"
diverged = "⇕⇡${ahead_count}⇣${behind_count}"
behind = "⇣${count}"
stashed = " "
modified = " "
staged = '[++\($count\)](green)'
renamed = "襁 "
deleted = " "
[terraform]
format = "via [ terraform $version]($style) 壟 [$workspace]($style) "
[vagrant]
format = "via [ vagrant $version]($style) "
[docker_context]
format = "via [ $context](bold blue) "
[helm]
format = "via [ $version](bold purple) "
[python]
symbol = " "
python_binary = "python3"
[nodejs]
format = "via [ $version](bold green) "
disabled = true
[ruby]
format = "via [ $version]($style) "
[kubernetes]
format = 'via [ﴱ $context\($namespace\)](bold purple) '
disabled = false
[kubernetes.context_aliases]
"do-fra1-prod-k8s-clcreative" = " lgcy-1"
"infra-home-kube-prod-1" = " prod-1"
"infra-home-kube-prod-2" = " prod-2"
"infra-cloud-kube-prod-1" = " prod-1"
"infra-cloud-kube-test-1" = " test-1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment