Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions clean_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ themes/easy
themes/essential
themes/modern
themes/norbu
themes/oh-my-posh
themes/pete
themes/powerline
themes/pure
Expand Down
13 changes: 13 additions & 0 deletions docs/themes-list/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,19 @@ NWinkler
:alt:


----

.. _oh_my_posh_image:

Oh-My-Posh
^^^^^^^^^^


.. image:: https://bash-it.github.io/bash-it/docs/images/oh-my-posh.png
:target: https://bash-it.github.io/bash-it/docs/images/oh-my-posh.png
:alt:


----

Pete
Expand Down
15 changes: 15 additions & 0 deletions docs/themes-list/oh-my-posh.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.. _oh-my-posh:

Oh-My-Posh Theme
================

The oh-my-posh ״theme״ is really a plug to a whole other system
of managing your prompt. To use it please start here:
`Oh-My-Posh homepage <https://ohmyposh.dev/>`_

It is beyond the scope of bash-it to install and manage oh-my-posh,
this theme is here just to make sure your OMP setup doesn't clash
with other bash-it themes. Once installed, OMP will load a default
OMP theme (jandedobbeleer), which you can then customize or override.

Note: Nerd Fonts are highly recommended, as most of the themes are graphic candies.
20 changes: 20 additions & 0 deletions themes/oh-my-posh/oh-my-posh.theme.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# shellcheck shell=bash

if _command_exists oh-my-posh; then
export POSH_THEME=${POSH_THEME:-https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/v$(oh-my-posh --version)/themes/jandedobbeleer.omp.json}
eval "$(oh-my-posh --init --shell bash --config "${POSH_THEME}")"
else
_log_warning "The oh-my-posh binary was not found on your \$PATH."
_log_warning "Falling back to your existing \$PS1."
_log_warning
_log_warning "*** Note:"
_log_warning "The oh-my-posh ״theme״ is really a plug to a whole other system"
_log_warning "of managing your prompt. To use it please start here:"
_log_warning "https://ohmyposh.dev/"
_log_warning
_log_warning "It is beyond the scope of bash-it to install and manage oh-my-posh,"
_log_warning "this theme is here just to make sure your OMP setup doesn't clash"
_log_warning "with other bash-it themes. Once installed, OMP will load a default"
_log_warning "OMP theme (jandedobbeleer), which you can then"
_log_warning "customize or override."
fi