Add a 'theme' for OMP, so the internal themes don't clash with it. (#2100)
* Add a 'theme' for OMP, so the internal themes don't clash with it. * Add theme to clean_files * Add screenshot to the docs * Correct the name of the default theme in the docs. * keeping it cleaner Co-authored-by: Ira Abramov <github@ira.abramov.org>pull/2095/merge
parent
db6fd42104
commit
ec6d371db8
|
|
@ -161,6 +161,7 @@ themes/essential
|
||||||
themes/githelpers.theme.bash
|
themes/githelpers.theme.bash
|
||||||
themes/modern
|
themes/modern
|
||||||
themes/norbu
|
themes/norbu
|
||||||
|
themes/oh-my-posh
|
||||||
themes/p4helpers.theme.bash
|
themes/p4helpers.theme.bash
|
||||||
themes/pete
|
themes/pete
|
||||||
themes/powerline
|
themes/powerline
|
||||||
|
|
|
||||||
|
|
@ -346,6 +346,19 @@ NWinkler
|
||||||
:alt:
|
: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
|
Pete
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
# 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. Falling back to your existing PS1, please see the docs for more info."
|
||||||
|
fi
|
||||||
Loading…
Reference in New Issue