Skip to content

Instantly share code, notes, and snippets.

@teocci
Last active January 22, 2026 04:54
Show Gist options
  • Select an option

  • Save teocci/47da687143b82b8861ad18d8676976fd to your computer and use it in GitHub Desktop.

Select an option

Save teocci/47da687143b82b8861ad18d8676976fd to your computer and use it in GitHub Desktop.

If the Icos are no loading, this is because your terminal is likely not using a Nerd Font. Oh My Posh requires a Nerd Font (like Cascadia Code Nerd Font or Meslo) to render the icons (e.g., \ue62a, \uf489). 2. Date Format: I have updated the JSON to use the Year. Month. Day. | 24H format you requested.

Fix the Font (Required for Icons)

Critical: Fix Icon Loading

The icons still won't display without a Nerd Font. You must:

# 1. Install a Nerd Font (example)
winget install -e --id Microsoft.CascadiaCode.NF

# 2. Configure your terminal to use it
# In Windows Terminal: Settings → Profiles → Defaults → Appearance → Font face → "CascadiaCode NF"

# 3. Reload Oh My Posh
. $PROFILE

If you see boxes or question marks instead of icons, you must install a Nerd Font and select it in your terminal settings.

  1. Download a Nerd Font: I recommend Cascadia Code Nerd Font (or MesloLGS NF).
  2. Install: Unzip the downloaded file, right-click on the font files ending in NF, and click Install.
  3. Configure Terminal:
    • Open Windows Terminal (or VS Code terminal).
    • Press Ctrl + , to open Settings.
    • Go to Profiles -> Defaults -> Appearance.
    • Change Font face to Cascadia Code NF (or whichever font you installed).

1) Create a custom theme file

Run this in PowerShell:

$themeDir = Join-Path $env:USERPROFILE ".config\ohmyposh"
New-Item -ItemType Directory -Force $themeDir | Out-Null

$themePath = Join-Path $themeDir "teocci.omp.json"

@'
{
  "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
  "palette": {
    "white": "#f7f7f7",
    "black": "#111111"
  },
  "blocks": [
    {
      "type": "prompt",
      "alignment": "left",
      "newline": true,
      "segments": [
        {
          "background": "transparent",
          "foreground": "p:white",
          "style": "plain",
          "template": "\u250c",
          "type": "text"
        },
        {
          "background": "#464646",
          "foreground": "p:white",
          "options": {
            "windows": "\ue62a",
            "linux": "\uf17c",
            "ubuntu": "\uf31b",
            "macos": "\uf179"
          },
          "style": "plain",
          "template": " {{.Icon}}{{if .WSL}} (WSL){{end}}\u2800",
          "type": "os"
        },
        {
          "background": "p:white",
          "foreground": "p:black",
          "style": "plain",
          "template": " \uf489 {{.Name}}\u2800",
          "type": "shell"
        },
        {
          "background": "#ffe093",
          "foreground": "p:black",
          "style": "plain",
          "template": " \uf2c0 {{.HostName}}\ue0bd{{.UserName}}\u2800",
          "type": "session"
        },
        {
          "type": "python",
          "background": "#2b2b2b",
          "foreground": "p:white",
          "style": "plain",
          "template": " \ue235 {{ if .Venv }}{{ .Venv }}{{ else }}{{ .Full }}{{ end }}\u2800",
          "options": {
            "display_mode": "environment",
            "fetch_virtual_env": true,
            "home_enabled": false
          }
        },
        {
          "background": "#ffffd6",
          "foreground": "p:black",
          "options": {
            "branch_icon": " \ue0a0 "
          },
          "style": "plain",
          "template": "{{.HEAD}}\u2800",
          "type": "git"
        }
      ]
    },
    {
      "type": "prompt",
      "alignment": "right",
      "segments": [
        {
          "background": "transparent",
          "foreground": "#b3ffde",
          "options": {
            "style": "austin",
            "threshold": 0
          },
          "style": "plain",
          "template": "{{.FormattedMs}}",
          "type": "executiontime"
        },
        {
          "background": "transparent",
          "foreground": "#b3ffde",
          "options": {
            "time_format": "2006. 01. 02. | 15:04"
          },
          "style": "plain",
          "template": "<p:white> · </>{{.CurrentDate | date .Format}}",
          "type": "time"
        }
      ]
    },
    {
      "type": "prompt",
      "alignment": "left",
      "newline": true,
      "segments": [
        {
          "background": "transparent",
          "foreground": "p:white",
          "options": {
            "folder_icon": "\uf07b",
            "folder_separator_template": "<#93d0ff> \u00bb </>",
            "home_icon": "\ueb06",
            "style": "agnoster"
          },
          "style": "plain",
          "template": "<p:white>\u2514</><#93d0ff>[</> {{.Path}} <#93d0ff>]</>",
          "type": "path"
        }
      ]
    },
    {
      "type": "prompt",
      "alignment": "left",
      "newline": true,
      "segments": [
        {
          "background": "transparent",
          "foreground": "#81ff91",
          "foreground_templates": [
            "{{if gt .Code 0}}#ff3030{{end}}"
          ],
          "options": {
            "always_enabled": true
          },
          "style": "plain",
          "template": "\u276f",
          "type": "status"
        }
      ]
    }
  ],
  "console_title_template": "{{if .Root}}[root] {{end}}{{.Shell}} in <{{.Folder}}>",
  "final_space": true,
  "version": 4
}
'@ | Set-Content -Encoding utf8 $themePath

$themePath

Notes:

  • The right-aligned block is positioned on the line above using vertical_offset: -1 (common pattern in shipped themes). (powershellgallery.com)
  • The text segment is the simplest way to render only a prompt glyph. (ohmyposh.dev)
  • The time_format uses Go’s reference date/time layout. (ohmyposh.dev)

If your terminal font doesn’t render , replace it with a plain > in the theme.


2) Point your PowerShell profile to this theme

Open your profile:

notepad $PROFILE

Add this line at the end:

oh-my-posh init pwsh --config "$env:USERPROFILE\.config\ohmyposh\teocci.omp.json" | Invoke-Expression

This is the standard way to set a custom config via --config. (ohmyposh.dev)

Reload:

. $PROFILE

3) Quick tweaks (optional)

Put date/time on the same line as the prompt

Remove the newline block and set the right block vertical_offset to 0 (or remove it).

Change the date format

You asked for: YYYY. MM. DD. | 24H

  • already implemented as: 2006. 01. 02. | 15:04 (ohmyposh.dev)

If you want the prompt to include current folder (still minimal) while keeping the same top-right date, tell me whether you want:

  • full path, or only current folder name, and
  • whether you want it on the same line as or above it.

Minimal Oh My Posh configuration

Here is the step-by-step guide to setting this up.

Install JanDeDobbeleer.OhMyPosh using this command:

winget install JanDeDobbeleer.OhMyPosh -s winget

Step 1: Create the Configuration File

Create a JSON file that defines the theme.

  1. Open your terminal (PowerShell).
  2. Run the following command to create a new theme file named teocci.omp.json in your user folder:
New-Item -Path $HOME -Name "teocci.omp.json" -ItemType File
  1. Open this file in Notepad (or your preferred editor):
notepad $HOME\teocci.omp.json

Step 2: Paste the Configuration

Copy the code below and paste it into the teocci.omp.json file you just opened. I have configured the Korean date format (2006. 01. 02. | 15:04) and the layout to match your screenshot (Path on left, Time on right, Arrow on the next line).

{
  "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
  "blocks": [
    {
      "type": "prompt",
      "alignment": "left",
      "segments": [
        {
          "type": "path",
          "style": "plain",
          "template": "{{ .Path }}",
          "foreground": "#ffffff",
          "properties": {
            "style": "full"
          }
        }
      ]
    },
    {
      "type": "prompt",
      "alignment": "right",
      "segments": [
        {
          "type": "executiontime",
          "style": "plain",
          "foreground": "#ffffff",
          "template": "{{ .FormattedMs }} "
        },
        {
          "type": "time",
          "style": "plain",
          "foreground": "#ffffff",
          "properties": {
            "time_format": "2006. 01. 02. | 15:04"
          },
          "template": "{{ .CurrentDate | date .Format }}"
        }
      ]
    },
    {
      "type": "prompt",
      "alignment": "left",
      "newline": true,
      "segments": [
        {
          "type": "text",
          "style": "plain",
          "foreground": "#ffff00",
          "template": ""
        }
      ]
    }
  ]
}
  • Save the file and close Notepad.

Step 3: Apply the Theme

Now you need to tell PowerShell to use this specific file.

  1. Open your PowerShell Profile:
notepad $PROFILE

(If it asks to create the file, say Yes). 2. Add (or replace) the Oh My Posh init line with the following command pointing to your new file:

oh-my-posh init pwsh --config "$HOME\teocci.omp.json" | Invoke-Expression
  1. Save and close the profile.

Step 4: Reload

Run this command to reload your profile and see the changes immediately:

. $PROFILE

Explanation of the Date Format

In the JSON above, I used the Go layout string for the date format you requested:

  • 2006 represents the Year (e.g., 2026)
  • 01 represents the Month
  • 02 represents the Day
  • 15 represents the Hour (24-hour format)
  • 04 represents the Minute

This results in your desired output: 2026. 01. 18. | 17:30

Would you like me to adjust the colors (for example, make the arrow green instead of yellow)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment