Skip to content

Instantly share code, notes, and snippets.

@GreepTheSheep
Last active October 20, 2021 11:41
Show Gist options
  • Save GreepTheSheep/db86ae95ed0c4d5958eac6a83dd6be72 to your computer and use it in GitHub Desktop.
Save GreepTheSheep/db86ae95ed0c4d5958eac6a83dd6be72 to your computer and use it in GitHub Desktop.
Greep's Oh My Posh themes

Oh My Posh Themes for Powershell Core (pwsh)

Install

  • Make sure you installed posh modules (posh-git and oh-my-posh)
    • If you havent, copy paste there 2 lines:
# remove -Scope parameter if you want only for user
Install-Module posh-git -Scope AllUsers
Install-Module oh-my-posh -Scope AllUsers
  • On pwsh, execute notepad $PROFILE (or any text editor) to open the profile file, if it shows an error, you need to create the file at the right directory
  • Copy paste the .ps1 file content on this
  • Change the $local_path variable to your proper username, you can't use %username% as pwsh can't reconize it
  • Feel free to change the $download_url to your theme of your choice, themes list below
  • Enjoy!

Themes on this gist:

  • thegreepone.omp.json (is a edit of the default theme jandedobbeleer, it fits more with our utilization)
    • thegreepone_versionright.omp.json (the programs version are moved to the right on this variation)
    • thegreepone_noversion.omp.json (removes the versions and keep the useful information)

Add _short.omp.json for short folder name (example: thegreepone_versionright_short.omp.json)

Import-Module posh-git
Import-Module oh-my-posh
$download_url = "https://gist.githubusercontent.com/GreepTheSheep/db86ae95ed0c4d5958eac6a83dd6be72/raw/thegreepone.omp.json"
$local_path = "C:/Users/%username%/Documents/PowerShell/thegreepone.omp.json"
$WebClient = New-Object System.Net.WebClient
$WebClient.DownloadFile($download_url, $local_path)
Set-PoshPrompt -Theme "~/Documents/PowerShell/thegreepone.omp.json"
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"console_title": true,
"console_title_style": "template",
"console_title_template": "{{ .Folder }} - {{ .Shell }}{{if .Root}} (Admin){{end}}",
"final_space": true,
"blocks": [
{
"alignment": "left",
"type": "prompt",
"segments": [
{
"background": "#7b64e2",
"foreground": "#ffffff",
"leading_diamond": "",
"style": "diamond",
"trailing_diamond": "",
"properties": {
"windows": ""
},
"type": "os"
},
{
"background": "#7b64e2",
"foreground": "#000000",
"properties": {
"root_icon": ""
},
"style": "diamond",
"type": "root"
},
{
"background": "#7b64e2",
"foreground": "#ffffff",
"properties": {
"display_host": false,
"postfix": " "
},
"style": "diamond",
"type": "session"
},
{
"background": "#da47ff",
"foreground": "#ffffff",
"powerline_symbol": "",
"properties": {
"folder_separator_icon": "",
"style": "full",
"enable_hyperlink": true
},
"style": "powerline",
"type": "path"
},
{
"background": "#fffb38",
"foreground": "#193549",
"powerline_symbol": "",
"properties": {
"ahead_and_behind_color": "#f26d50",
"ahead_color": "#89d1dc",
"behind_color": "#f17c37",
"display_stash_count": true,
"display_upstream_icon": true,
"local_changes_color": "#ff9248",
"stash_count_icon": "",
"status_colors_enabled": true
},
"style": "powerline",
"type": "git"
},
{
"background": "#6CA35E",
"foreground": "#ffffff",
"powerline_symbol": "",
"properties": {
"display_version": true,
"prefix": ""
},
"style": "powerline",
"type": "node"
},
{
"background": "#8ED1F7",
"foreground": "#111111",
"powerline_symbol": "",
"properties": {
"display_version": true,
"prefix": ""
},
"style": "powerline",
"type": "go"
},
{
"type": "dotnet",
"style": "powerline",
"powerline_symbol": "",
"foreground": "#000000",
"background": "#00ffff",
"properties": {
"display_version": true,
"prefix": ""
}
},
{
"background": "#4063D8",
"foreground": "#111111",
"powerline_symbol": "",
"properties": {
"display_version": true,
"prefix": ""
},
"style": "powerline",
"type": "julia"
},
{
"background": "#FFDE57",
"foreground": "#111111",
"powerline_symbol": "",
"properties": {
"display_mode": "files",
"display_version": true,
"display_virtual_env": false,
"prefix": ""
},
"style": "powerline",
"type": "python"
},
{
"background": "#AE1401",
"foreground": "#ffffff",
"powerline_symbol": "",
"properties": {
"display_mode": "files",
"display_version": true,
"prefix": ""
},
"style": "powerline",
"type": "ruby"
},
{
"background": "#FEAC19",
"foreground": "#ffffff",
"powerline_symbol": "",
"properties": {
"display_mode": "files",
"display_version": false,
"prefix": ""
},
"style": "powerline",
"type": "azfunc"
},
{
"background_templates": [
"{{if contains \"default\" .Profile}}#FFA400{{end}}",
"{{if contains \"jan\" .Profile}}#f1184c{{end}}"
],
"foreground": "#ffffff",
"powerline_symbol": "",
"properties": {
"display_default": false,
"prefix": ""
},
"style": "powerline",
"type": "aws"
}
]
},
{
"type": "rprompt",
"segments": [
{
"background": "#0077c2",
"foreground": "#ffffff",
"properties": {
"always_enabled": false,
"prefix": ""
},
"style": "powerline",
"invert_powerline": true,
"powerline_symbol": "",
"type": "executiontime"
},
{
"background": "#2e9599",
"foreground": "#ffffff",
"properties": {
"always_enabled": false,
"color_background": true,
"display_exit_code": false,
"error_color": "#f1184c",
"prefix": ""
},
"style": "powerline",
"invert_powerline": true,
"powerline_symbol": "",
"type": "exit"
}
]
}
]
}
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"console_title": true,
"console_title_style": "template",
"console_title_template": "{{ .Folder }} - {{ .Shell }}{{if .Root}} (Admin){{end}}",
"final_space": true,
"blocks": [
{
"alignment": "left",
"type": "prompt",
"segments": [
{
"background": "#7b64e2",
"foreground": "#ffffff",
"leading_diamond": "",
"style": "diamond",
"trailing_diamond": "",
"properties": {
"windows": ""
},
"type": "os"
},
{
"background": "#7b64e2",
"foreground": "#000000",
"properties": {
"root_icon": ""
},
"style": "diamond",
"type": "root"
},
{
"background": "#7b64e2",
"foreground": "#ffffff",
"properties": {
"display_host": false,
"postfix": " "
},
"style": "diamond",
"type": "session"
},
{
"background": "#da47ff",
"foreground": "#ffffff",
"powerline_symbol": "",
"properties": {
"folder_separator_icon": "",
"style": "full",
"enable_hyperlink": true
},
"style": "powerline",
"type": "path"
},
{
"background": "#fffb38",
"foreground": "#193549",
"powerline_symbol": "",
"properties": {
"ahead_and_behind_color": "#f26d50",
"ahead_color": "#89d1dc",
"behind_color": "#f17c37",
"display_stash_count": true,
"display_upstream_icon": true,
"local_changes_color": "#ff9248",
"stash_count_icon": "",
"status_colors_enabled": true
},
"style": "powerline",
"type": "git"
},
{
"background_templates": [
"{{if contains \"default\" .Profile}}#FFA400{{end}}",
"{{if contains \"jan\" .Profile}}#f1184c{{end}}"
],
"foreground": "#ffffff",
"powerline_symbol": "",
"properties": {
"display_default": false,
"prefix": ""
},
"style": "powerline",
"type": "aws"
}
]
},
{
"type": "rprompt",
"segments": [
{
"background": "#0077c2",
"foreground": "#ffffff",
"properties": {
"always_enabled": false,
"prefix": ""
},
"style": "powerline",
"invert_powerline": true,
"powerline_symbol": "",
"type": "executiontime"
},
{
"background": "#2e9599",
"foreground": "#ffffff",
"properties": {
"always_enabled": false,
"color_background": true,
"display_exit_code": false,
"error_color": "#f1184c",
"prefix": ""
},
"style": "powerline",
"invert_powerline": true,
"powerline_symbol": "",
"type": "exit"
}
]
}
]
}
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"console_title": true,
"console_title_style": "template",
"console_title_template": "{{ .Folder }} - {{ .Shell }}{{if .Root}} (Admin){{end}}",
"final_space": true,
"blocks": [
{
"alignment": "left",
"type": "prompt",
"segments": [
{
"background": "#7b64e2",
"foreground": "#ffffff",
"leading_diamond": "",
"style": "diamond",
"trailing_diamond": "",
"properties": {
"windows": ""
},
"type": "os"
},
{
"background": "#7b64e2",
"foreground": "#000000",
"properties": {
"root_icon": ""
},
"style": "diamond",
"type": "root"
},
{
"background": "#7b64e2",
"foreground": "#ffffff",
"properties": {
"display_host": false,
"postfix": " "
},
"style": "diamond",
"type": "session"
},
{
"background": "#da47ff",
"foreground": "#ffffff",
"powerline_symbol": "",
"properties": {
"folder_separator_icon": "",
"style": "folder",
"enable_hyperlink": true
},
"style": "powerline",
"type": "path"
},
{
"background": "#fffb38",
"foreground": "#193549",
"powerline_symbol": "",
"properties": {
"ahead_and_behind_color": "#f26d50",
"ahead_color": "#89d1dc",
"behind_color": "#f17c37",
"display_stash_count": true,
"display_upstream_icon": true,
"local_changes_color": "#ff9248",
"stash_count_icon": "",
"status_colors_enabled": true
},
"style": "powerline",
"type": "git"
},
{
"background_templates": [
"{{if contains \"default\" .Profile}}#FFA400{{end}}",
"{{if contains \"jan\" .Profile}}#f1184c{{end}}"
],
"foreground": "#ffffff",
"powerline_symbol": "",
"properties": {
"display_default": false,
"prefix": ""
},
"style": "powerline",
"type": "aws"
}
]
},
{
"type": "rprompt",
"segments": [
{
"background": "#0077c2",
"foreground": "#ffffff",
"properties": {
"always_enabled": false,
"prefix": ""
},
"style": "powerline",
"invert_powerline": true,
"powerline_symbol": "",
"type": "executiontime"
},
{
"background": "#2e9599",
"foreground": "#ffffff",
"properties": {
"always_enabled": false,
"color_background": true,
"display_exit_code": false,
"error_color": "#f1184c",
"prefix": ""
},
"style": "powerline",
"invert_powerline": true,
"powerline_symbol": "",
"type": "exit"
}
]
}
]
}
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"console_title": true,
"console_title_style": "template",
"console_title_template": "{{ .Folder }} - {{ .Shell }}{{if .Root}} (Admin){{end}}",
"final_space": true,
"blocks": [
{
"alignment": "left",
"type": "prompt",
"segments": [
{
"background": "#7b64e2",
"foreground": "#ffffff",
"leading_diamond": "",
"style": "diamond",
"trailing_diamond": "",
"properties": {
"windows": ""
},
"type": "os"
},
{
"background": "#7b64e2",
"foreground": "#000000",
"properties": {
"root_icon": ""
},
"style": "diamond",
"type": "root"
},
{
"background": "#7b64e2",
"foreground": "#ffffff",
"properties": {
"display_host": false,
"postfix": " "
},
"style": "diamond",
"type": "session"
},
{
"background": "#da47ff",
"foreground": "#ffffff",
"powerline_symbol": "",
"properties": {
"folder_separator_icon": "",
"style": "folder",
"enable_hyperlink": true
},
"style": "powerline",
"type": "path"
},
{
"background": "#fffb38",
"foreground": "#193549",
"powerline_symbol": "",
"properties": {
"ahead_and_behind_color": "#f26d50",
"ahead_color": "#89d1dc",
"behind_color": "#f17c37",
"display_stash_count": true,
"display_upstream_icon": true,
"local_changes_color": "#ff9248",
"stash_count_icon": "",
"status_colors_enabled": true
},
"style": "powerline",
"type": "git"
},
{
"background": "#6CA35E",
"foreground": "#ffffff",
"powerline_symbol": "",
"properties": {
"display_version": true,
"prefix": ""
},
"style": "powerline",
"type": "node"
},
{
"background": "#8ED1F7",
"foreground": "#111111",
"powerline_symbol": "",
"properties": {
"display_version": true,
"prefix": ""
},
"style": "powerline",
"type": "go"
},
{
"type": "dotnet",
"style": "powerline",
"powerline_symbol": "",
"foreground": "#000000",
"background": "#00ffff",
"properties": {
"display_version": true,
"prefix": ""
}
},
{
"background": "#4063D8",
"foreground": "#111111",
"powerline_symbol": "",
"properties": {
"display_version": true,
"prefix": ""
},
"style": "powerline",
"type": "julia"
},
{
"background": "#FFDE57",
"foreground": "#111111",
"powerline_symbol": "",
"properties": {
"display_mode": "files",
"display_version": true,
"display_virtual_env": false,
"prefix": ""
},
"style": "powerline",
"type": "python"
},
{
"background": "#AE1401",
"foreground": "#ffffff",
"powerline_symbol": "",
"properties": {
"display_mode": "files",
"display_version": true,
"prefix": ""
},
"style": "powerline",
"type": "ruby"
},
{
"background": "#FEAC19",
"foreground": "#ffffff",
"powerline_symbol": "",
"properties": {
"display_mode": "files",
"display_version": false,
"prefix": ""
},
"style": "powerline",
"type": "azfunc"
},
{
"background_templates": [
"{{if contains \"default\" .Profile}}#FFA400{{end}}",
"{{if contains \"jan\" .Profile}}#f1184c{{end}}"
],
"foreground": "#ffffff",
"powerline_symbol": "",
"properties": {
"display_default": false,
"prefix": ""
},
"style": "powerline",
"type": "aws"
}
]
},
{
"type": "rprompt",
"segments": [
{
"background": "#0077c2",
"foreground": "#ffffff",
"properties": {
"always_enabled": false,
"prefix": ""
},
"style": "powerline",
"invert_powerline": true,
"powerline_symbol": "",
"type": "executiontime"
},
{
"background": "#2e9599",
"foreground": "#ffffff",
"properties": {
"always_enabled": false,
"color_background": true,
"display_exit_code": false,
"error_color": "#f1184c",
"prefix": ""
},
"style": "powerline",
"invert_powerline": true,
"powerline_symbol": "",
"type": "exit"
}
]
}
]
}
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"console_title": true,
"console_title_style": "template",
"console_title_template": "{{ .Folder }} - {{ .Shell }}{{if .Root}} (Admin){{end}}",
"final_space": true,
"blocks": [
{
"alignment": "left",
"type": "prompt",
"segments": [
{
"background": "#7b64e2",
"foreground": "#ffffff",
"leading_diamond": "",
"style": "diamond",
"trailing_diamond": "",
"properties": {
"windows": ""
},
"type": "os"
},
{
"background": "#7b64e2",
"foreground": "#000000",
"properties": {
"root_icon": ""
},
"style": "diamond",
"type": "root"
},
{
"background": "#7b64e2",
"foreground": "#ffffff",
"properties": {
"display_host": false,
"postfix": " "
},
"style": "diamond",
"type": "session"
},
{
"background": "#da47ff",
"foreground": "#ffffff",
"powerline_symbol": "",
"properties": {
"folder_separator_icon": "",
"style": "full",
"enable_hyperlink": true
},
"style": "powerline",
"type": "path"
},
{
"background": "#fffb38",
"foreground": "#193549",
"powerline_symbol": "",
"properties": {
"ahead_and_behind_color": "#f26d50",
"ahead_color": "#89d1dc",
"behind_color": "#f17c37",
"display_stash_count": true,
"display_upstream_icon": true,
"local_changes_color": "#ff9248",
"stash_count_icon": "",
"status_colors_enabled": true
},
"style": "powerline",
"type": "git"
},
{
"background_templates": [
"{{if contains \"default\" .Profile}}#FFA400{{end}}",
"{{if contains \"jan\" .Profile}}#f1184c{{end}}"
],
"foreground": "#ffffff",
"powerline_symbol": "",
"properties": {
"display_default": false,
"prefix": ""
},
"style": "powerline",
"type": "aws"
}
]
},
{
"type": "rprompt",
"segments": [
{
"background": "#6CA35E",
"foreground": "#ffffff",
"powerline_symbol": "",
"invert_powerline": true,
"properties": {
"display_version": true,
"prefix": ""
},
"style": "powerline",
"type": "node"
},
{
"background": "#8ED1F7",
"foreground": "#111111",
"powerline_symbol": "",
"invert_powerline": true,
"properties": {
"display_version": true,
"prefix": ""
},
"style": "powerline",
"type": "go"
},
{
"type": "dotnet",
"style": "powerline",
"powerline_symbol": "",
"invert_powerline": true,
"foreground": "#000000",
"background": "#00ffff",
"properties": {
"display_version": true,
"prefix": ""
}
},
{
"background": "#4063D8",
"foreground": "#111111",
"powerline_symbol": "",
"invert_powerline": true,
"properties": {
"display_version": true,
"prefix": ""
},
"style": "powerline",
"type": "julia"
},
{
"background": "#FFDE57",
"foreground": "#111111",
"powerline_symbol": "",
"invert_powerline": true,
"properties": {
"display_mode": "files",
"display_version": true,
"display_virtual_env": false,
"prefix": ""
},
"style": "powerline",
"type": "python"
},
{
"background": "#AE1401",
"foreground": "#ffffff",
"powerline_symbol": "",
"invert_powerline": true,
"properties": {
"display_mode": "files",
"display_version": true,
"prefix": ""
},
"style": "powerline",
"type": "ruby"
},
{
"background": "#FEAC19",
"foreground": "#ffffff",
"powerline_symbol": "",
"invert_powerline": true,
"properties": {
"display_mode": "files",
"display_version": false,
"prefix": ""
},
"style": "powerline",
"type": "azfunc"
},
{
"background": "#0077c2",
"foreground": "#ffffff",
"properties": {
"always_enabled": false,
"prefix": ""
},
"style": "powerline",
"invert_powerline": true,
"powerline_symbol": "",
"type": "executiontime"
},
{
"background": "#2e9599",
"foreground": "#ffffff",
"properties": {
"always_enabled": false,
"color_background": true,
"display_exit_code": false,
"error_color": "#f1184c",
"prefix": ""
},
"style": "powerline",
"invert_powerline": true,
"powerline_symbol": "",
"type": "exit"
}
]
}
]
}
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"console_title": true,
"console_title_style": "template",
"console_title_template": "{{ .Folder }} - {{ .Shell }}{{if .Root}} (Admin){{end}}",
"final_space": true,
"blocks": [
{
"alignment": "left",
"type": "prompt",
"segments": [
{
"background": "#7b64e2",
"foreground": "#ffffff",
"leading_diamond": "",
"style": "diamond",
"trailing_diamond": "",
"properties": {
"windows": ""
},
"type": "os"
},
{
"background": "#7b64e2",
"foreground": "#000000",
"properties": {
"root_icon": ""
},
"style": "diamond",
"type": "root"
},
{
"background": "#7b64e2",
"foreground": "#ffffff",
"properties": {
"display_host": false,
"postfix": " "
},
"style": "diamond",
"type": "session"
},
{
"background": "#da47ff",
"foreground": "#ffffff",
"powerline_symbol": "",
"properties": {
"folder_separator_icon": "",
"style": "folder",
"enable_hyperlink": true
},
"style": "powerline",
"type": "path"
},
{
"background": "#fffb38",
"foreground": "#193549",
"powerline_symbol": "",
"properties": {
"ahead_and_behind_color": "#f26d50",
"ahead_color": "#89d1dc",
"behind_color": "#f17c37",
"display_stash_count": true,
"display_upstream_icon": true,
"local_changes_color": "#ff9248",
"stash_count_icon": "",
"status_colors_enabled": true
},
"style": "powerline",
"type": "git"
},
{
"background_templates": [
"{{if contains \"default\" .Profile}}#FFA400{{end}}",
"{{if contains \"jan\" .Profile}}#f1184c{{end}}"
],
"foreground": "#ffffff",
"powerline_symbol": "",
"properties": {
"display_default": false,
"prefix": ""
},
"style": "powerline",
"type": "aws"
}
]
},
{
"type": "rprompt",
"segments": [
{
"background": "#6CA35E",
"foreground": "#ffffff",
"powerline_symbol": "",
"invert_powerline": true,
"properties": {
"display_version": true,
"prefix": ""
},
"style": "powerline",
"type": "node"
},
{
"background": "#8ED1F7",
"foreground": "#111111",
"powerline_symbol": "",
"invert_powerline": true,
"properties": {
"display_version": true,
"prefix": ""
},
"style": "powerline",
"type": "go"
},
{
"type": "dotnet",
"style": "powerline",
"powerline_symbol": "",
"invert_powerline": true,
"foreground": "#000000",
"background": "#00ffff",
"properties": {
"display_version": true,
"prefix": ""
}
},
{
"background": "#4063D8",
"foreground": "#111111",
"powerline_symbol": "",
"invert_powerline": true,
"properties": {
"display_version": true,
"prefix": ""
},
"style": "powerline",
"type": "julia"
},
{
"background": "#FFDE57",
"foreground": "#111111",
"powerline_symbol": "",
"invert_powerline": true,
"properties": {
"display_mode": "files",
"display_version": true,
"display_virtual_env": false,
"prefix": ""
},
"style": "powerline",
"type": "python"
},
{
"background": "#AE1401",
"foreground": "#ffffff",
"powerline_symbol": "",
"invert_powerline": true,
"properties": {
"display_mode": "files",
"display_version": true,
"prefix": ""
},
"style": "powerline",
"type": "ruby"
},
{
"background": "#FEAC19",
"foreground": "#ffffff",
"powerline_symbol": "",
"invert_powerline": true,
"properties": {
"display_mode": "files",
"display_version": false,
"prefix": ""
},
"style": "powerline",
"type": "azfunc"
},
{
"background": "#0077c2",
"foreground": "#ffffff",
"properties": {
"always_enabled": false,
"prefix": ""
},
"style": "powerline",
"invert_powerline": true,
"powerline_symbol": "",
"type": "executiontime"
},
{
"background": "#2e9599",
"foreground": "#ffffff",
"properties": {
"always_enabled": false,
"color_background": true,
"display_exit_code": false,
"error_color": "#f1184c",
"prefix": ""
},
"style": "powerline",
"invert_powerline": true,
"powerline_symbol": "",
"type": "exit"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment