Skip to content

Commit ec6d371

Browse files
ira-bvseefood
andauthored
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 <[email protected]>
1 parent db6fd42 commit ec6d371

File tree

4 files changed

+37
-0
lines changed

4 files changed

+37
-0
lines changed

clean_files.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ themes/essential
161161
themes/githelpers.theme.bash
162162
themes/modern
163163
themes/norbu
164+
themes/oh-my-posh
164165
themes/p4helpers.theme.bash
165166
themes/pete
166167
themes/powerline

docs/themes-list/index.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,19 @@ NWinkler
346346
:alt:
347347

348348

349+
----
350+
351+
.. _oh_my_posh_image:
352+
353+
Oh-My-Posh
354+
^^^^^^^^^^
355+
356+
357+
.. image:: https://bash-it.github.io/bash-it/docs/images/oh-my-posh.png
358+
:target: https://bash-it.github.io/bash-it/docs/images/oh-my-posh.png
359+
:alt:
360+
361+
349362
----
350363

351364
Pete

docs/themes-list/oh-my-posh.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.. _oh-my-posh:
2+
3+
Oh-My-Posh Theme
4+
================
5+
6+
The oh-my-posh ״theme״ is really a plug to a whole other system
7+
of managing your prompt. To use it please start here:
8+
`Oh-My-Posh homepage <https://ohmyposh.dev/>`_
9+
10+
It is beyond the scope of bash-it to install and manage oh-my-posh,
11+
this theme is here just to make sure your OMP setup doesn't clash
12+
with other bash-it themes. Once installed, OMP will load a default
13+
OMP theme (jandedobbeleer), which you can then customize or override.
14+
15+
Note: Nerd Fonts are highly recommended, as most of the themes are graphic candies.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# shellcheck shell=bash
2+
3+
if _command_exists oh-my-posh; then
4+
export POSH_THEME=${POSH_THEME:-https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/v$(oh-my-posh --version)/themes/jandedobbeleer.omp.json}
5+
eval "$(oh-my-posh --init --shell bash --config "${POSH_THEME}")"
6+
else
7+
_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."
8+
fi

0 commit comments

Comments
 (0)