Skip to content

Instantly share code, notes, and snippets.

@KenBonny
Last active October 5, 2023 15:26
Show Gist options
  • Save KenBonny/20a11e67c8cc068e871553f91df3eac7 to your computer and use it in GitHub Desktop.
Save KenBonny/20a11e67c8cc068e871553f91df3eac7 to your computer and use it in GitHub Desktop.
powershell customisation scripts
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#FEF5ED",
"foreground": "#011627",
"properties": {
"macos": "\uf179 ",
"ubuntu": "\uf31b ",
"windows": "\ue62a "
},
"style": "diamond",
"template": " {{ if .WSL }}WSL at {{ end }}{{.Icon}}",
"trailing_diamond": "\ue0b0",
"type": "os"
},
{
"type": "root",
"style": "diamond",
"foreground": "#FFFFFF",
"background": "#c21d2b",
"leading_diamond": "<transparent,#c21d2b>\ue0b0</>",
"trailing_diamond": "\ue0b0",
"template": " \uf0e7 ",
"properties": {
"root_icon": "root"
}
},
{
"background": "#FEF5ED",
"foreground": "#011627",
"leading_diamond": "<transparent,#FEF5ED>\ue0b0</>",
"properties": {
"time_format": "15:04:05"
},
"style": "diamond",
"template": " \uf43a {{ .CurrentDate | date .Format }} ",
"type": "time"
},
{
"background": "#FEF5ED",
"foreground": "#011627",
"properties": {
"style": "roundrock",
"threshold": 0
},
"style": "diamond",
"template": " \uf254 {{ .FormattedMs }} ",
"trailing_diamond": "\ue0b0",
"type": "executiontime"
},
{
"background": "#ffffff",
"foreground": "#000000",
"leading_diamond": "<transparent,#ffffff>\ue0b0</>",
"properties": {
"fetch_package_manager": true,
"npm_icon": " <#cc3a3a>\ue5fa</> ",
"yarn_icon": " <#348cba>\uf61a</>"
},
"style": "diamond",
"template": "\ue718 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }}",
"trailing_diamond": "\ue0b0",
"type": "node"
},
{
"background": "#006400",
"foreground": "#011627",
"leading_diamond": "<transparent,#006400>\ue0b0</>",
"properties": {
"branch_icon": "\ue725 ",
"fetch_stash_count": true,
"fetch_status": true,
"fetch_upstream_icon": true,
"fetch_worktree_count": true
},
"style": "diamond",
"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 }} \uf692 {{ .StashCount }}{{ end }}",
"trailing_diamond": "\ue0b4",
"type": "git"
}
],
"type": "prompt"
},
{
"alignment": "right",
"segments": [
{
"background": "#196988",
"foreground": "#ffffff",
"leading_diamond": "\ue0b6",
"style": "diamond",
"template": "\ue266 CPU: {{ round .PhysicalPercentUsed .Precision }}% | ",
"type": "sysinfo"
},
{
"background": "#196988",
"foreground": "#ffffff",
"style": "diamond",
"template": "RAM: {{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1000000000.0) }}/{{ (div .PhysicalTotalMemory 1068786176.0) }}GB ",
"trailing_diamond": "\ue0b4",
"type": "sysinfo"
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#2fb3e7",
"properties": {
"folder_icon": "\uf07b",
"home_icon": "~",
"style": "agnoster_full"
},
"style": "diamond",
"template": " \ue5ff {{ .Folder }}",
"type": "path"
},
{
"foreground": "#2fb3e7",
"foreground_templates": ["{{ if gt .Code 0 }}#ff0000{{ end }}"],
"properties": {
"always_enabled": true
},
"style": "plain",
"template": " \u276F ",
"type": "exit"
}
],
"type": "prompt"
}
],
"console_title_template": "{{ .Folder }}",
"transient_prompt": {
"background": "transparent",
"foreground": "#FEF5ED",
"template": "\ue285 "
},
"version": 2
}
{
"final_space": false,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
"segments": [
{
"type": "time",
"style": "plain",
"foreground": "#C0C0C0",
"properties": {
"time_format": "15:04:05",
"prefix": "\uF64F "
}
},
{
"type": "root",
"style": "diamond",
"invert_powerline": false,
"foreground": "#FFFFFF",
"background": "#E06C75",
"leading_diamond": "\uE0B6",
"trailing_diamond": "\ue0b4 ",
"properties": {
"root_icon": "root"
}
},
{
"type": "path",
"style": "plain",
"foreground": "#007ACC",
"properties": {
"prefix": "\uF07C ",
"style": "folder"
}
},
{
"type": "git",
"style": "plain",
"foreground": "#006400",
"properties": {
"display_status": true,
"prefix": "\u003c#C0C0C0\u003eon\u003c/\u003e ",
"local_staged_icon": "\uf00c",
"local_working_icon": "\uf040"
}
},
{
"type": "node",
"style": "plain",
"foreground": "#98C379",
"properties": {
"display_version": true,
"prefix": "\u003c#C0C0C0\u003evia\u003c/\u003e  "
}
},
{
"type": "exit",
"style": "plain",
"foreground": "#c02323",
"properties": {
"display_exit_code": false,
"prefix": "\uF071"
}
}
]
},
{
"type": "newline",
"horizontal_offset": 0,
"vertical_offset": 0,
"segments": null
},
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
"segments": [
{
"type": "text",
"style": "plain",
"foreground": "#006400",
"properties": {
"text": "\uf17a"
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment