deadlydog / Oh-My-Posh.DeadlydogTheme

Custom theme called 'deadlydog' for oh-my-posh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deadlydog Oh My Posh Theme

πŸ’¬ Description

This is a custom theme for Oh My Posh, called deadlydog.

πŸ–Ό Screenshot and features

This is an example what the command prompt looks like with this theme:

deadlydog oh-my-posh screenshot

The top line's left block displays:

  • The logged in user and the computer name.
    • Handy if you run as different users or SSH into different servers.
  • The full current directory path.
    • Easy to select and copy the path, and can Ctrl+Click it to open in File Explorer.
  • If in a Git repository, shows the current Git branch and status.
  • If an error occurred on the previous command, a red ! is shown (not shown in screenshot).
    • Allows you to easily see if the previous executable returned a non-zero exit code.

The top line's right block displays:

  • How long the previous command took to run.
    • Great for when you start a long-running operation and walk away from your PC.
  • The current time that the information was displayed.

The next line will show different information depending on the context:

  • If logged into Azure, shows the current Azure subscription.
  • If logged into Kubernetes, shows the current k8s context and namespace.

Lastly, the prompt character is shown on the final line to accept user input.

❓ Why this exists

I wasn't quite happy with the out-of-the-box themes, so I created this one.

πŸš€ Quick start

To use this theme:

  1. Install Oh My Posh if you haven't already.

  2. Download and unzip the latest release of the deadlydog.omp.json theme file.

  3. Place the deadlydog.omp.json file somewhere where it can permanently live on your computer. A good place is the default Posh Themes Path, which you can find by running $env:POSH_THEMES_PATH in PowerShell. e.g. C:\Program Files\WindowsPowerShell\Modules\oh-my-posh\themes

  4. Set the theme in Oh My Posh.

    • The command will vary depending on which shell you are in.
    • You may need to change the file path to where you saved the deadlydog.omp.json file on your computer.
    • In PowerShell it would look something like:
    oh-my-posh --init --shell pwsh --config $env:POSH_THEMES_PATH/deadlydog.omp.json | Invoke-Expression

    Or if you have installed the oh-my-posh PowerShell module using Install-Module oh-my-posh, you can use the command:

    Set-PoshPrompt -Theme $env:POSH_THEMES_PATH/deadlydog.omp.json

πŸ•΅οΈβ€β™€οΈ Troubleshooting

If some characters do not show up properly, or you get errors like the following, it likely means that your terminal is not using a font that supports the unicode characters used in this theme:

invalid char escape

literal not terminated

invalid char literal

I recommend using the CaskaydiaCove Nerd Code font, which can be downloaded from here. Once you have downloaded and installed the font, you will need to update your terminal to use it.

πŸ“ƒ Changelog

See what's changed in the application over time by viewing the changelog.

πŸ’³ Donate

Buy me a donut 🍩 for providing this theme open source and for free πŸ™‚

paypal

About

Custom theme called 'deadlydog' for oh-my-posh

License:MIT License