Skip to content

Instantly share code, notes, and snippets.

@rascode
Last active February 21, 2022 17:47
Show Gist options
  • Save rascode/10b360bae9fe5cce606f868ef3d152b9 to your computer and use it in GitHub Desktop.
Save rascode/10b360bae9fe5cce606f868ef3d152b9 to your computer and use it in GitHub Desktop.
Rascode :: Oh-My-Posh :: Configuration File
eval "$(oh-my-posh --init --shell zsh --config /path/to/your.omp.json)"
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"osc99": true,
"blocks": [
{
"type": "prompt",
"alignment": "left",
"newline": true,
"segments": [
{
"type": "text",
"style":"plain",
"properties": {
"text": "\u00A7"
}
},
{
"type": "session",
"style": "plain",
"foreground": "#757575",
"properties": {
"user_info_separator": "",
"prefix": "",
"display_host": false
}
},
{
"type": "text",
"style": "plain",
"properties": {
"text": "in",
"postfix": "",
"prefix": ""
}
},
{
"type": "path",
"style": "plain",
"powerline_symbol": "\ue0b0",
"foreground": "#32f3a9",
"properties": {
"style": "folder",
"enable_hyperlink": true
}
},
{
"type": "git",
"style": "plain",
"powerline_symbol": " in \ue0b0",
"foreground": "#ff9248",
"properties": {
"prefix": "on ",
"branch_ahead_icon": "\u2191",
"branch_behind_icon": "\u2193",
"branch_gone": "\u2262",
"branch_icon": "\ue0a0 ",
"branch_identical_icon": "\u2261",
"cherry_pick_icon": "\u2713 ",
"color_background": true,
"commit_icon": "\u25b7 ",
"display_status": true,
"display_status_detail": true,
"display_stash_count": false,
"display_upstream_icon": true,
"git_icon": "\uE5FB ",
"github_icon": "\uF408 ",
"gitlab_icon": "\uF296 ",
"bitbucket_icon": "\uF171 ",
"azure_devops_icon": "\uFD03 ",
"local_staged_icon": "",
"local_working_icon": "",
"merge_icon": "\u25f4 ",
"no_commits_icon": "[no commits]",
"rebase_icon": "\u2c62 ",
"stash_count_icon": "",
"status_colors_enabled": true,
"status_separator_icon": " \u2502",
"tag_icon": "\u25b6 ",
"ahead_color": "#ff9248",
"behind_color": "red"
}
},
{
"type": "node",
"style": "plain",
"foreground": "#18f0e5",
"background": "transparent",
"properties": {
"prefix": " via \uE718 "
}
},
{
"type": "exit",
"style": "plain",
"powerline_symbol": "\ue0b0",
"foreground": "#ffffff",
"background": "red",
"properties": {
"display_exit_code": false,
"prefix": "on",
"postfix": " ",
"error_icon": "error"
}
}
]
},
{
"type": "prompt",
"alignment": "left",
"newline": true,
"segments": [
{
"type": "text",
"style": "plain",
"foreground": "#757575",
"properties": {
"prefix": "",
"postfix": "",
"text": ""
}
},
{
"type": "text",
"style": "plain",
"foreground": "#ffffff",
"properties": {
"prefix": "",
"postfix": "",
"text": ""
}
}
]
}
],
"final_space": true
}
@rascode
Copy link
Author

rascode commented Feb 21, 2022

Get Up and Running w/ Oh-My-Posh Configuration

  1. Define your own custom "Oh-My-Posh"(your.omp.json) config file -- or -- use one of the default themes.
  2. Add the path to your posh configuration file in your shell's configuration file (In my case, I'm using zsh shell on a mac so my configuration file is '.zshrc'.
  3. Save changes to configuration file
  4. Apply the changes to your shell - Run the source ~/.zshrc command from the term to apply the changes made in your shell config file.
  5. Enjoy your newly terminal interface 😎

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