disable theming by checking theme var for value
parent
fbefcb860b
commit
b03a93cd2b
|
|
@ -189,6 +189,7 @@ There are over 50+ Bash-it themes to pick from in `$BASH_IT/themes`.
|
||||||
The default theme is `bobby`.
|
The default theme is `bobby`.
|
||||||
Set `BASH_IT_THEME` to the theme name you want, or if you've developed your own custom theme outside of `$BASH_IT/themes`,
|
Set `BASH_IT_THEME` to the theme name you want, or if you've developed your own custom theme outside of `$BASH_IT/themes`,
|
||||||
point the `BASH_IT_THEME` variable directly to the theme file.
|
point the `BASH_IT_THEME` variable directly to the theme file.
|
||||||
|
To disable theming completely, leave the variable empty.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
|
|
@ -198,6 +199,9 @@ export BASH_IT_THEME="powerline-multiline"
|
||||||
|
|
||||||
# Use a theme outside of the Bash-it folder
|
# Use a theme outside of the Bash-it folder
|
||||||
export BASH_IT_THEME="/home/foo/my_theme/my_theme.theme.bash"
|
export BASH_IT_THEME="/home/foo/my_theme/my_theme.theme.bash"
|
||||||
|
|
||||||
|
# Disable theming
|
||||||
|
export BASH_IT_THEME=""
|
||||||
```
|
```
|
||||||
|
|
||||||
You can easily preview the themes in your own shell using `BASH_PREVIEW=true bash-it reload`.
|
You can easily preview the themes in your own shell using `BASH_PREVIEW=true bash-it reload`.
|
||||||
|
|
|
||||||
27
bash_it.sh
27
bash_it.sh
|
|
@ -46,19 +46,22 @@ do
|
||||||
_load_bash_it_files $file_type
|
_load_bash_it_files $file_type
|
||||||
done
|
done
|
||||||
|
|
||||||
# Load colors and helpers first so they can be used in base theme
|
# Load theme, if a theme was set
|
||||||
# shellcheck source=./themes/colors.theme.bash
|
if [[ ! -z "${BASH_IT_THEME}" ]]; then
|
||||||
source "${BASH_IT}/themes/colors.theme.bash"
|
# Load colors and helpers first so they can be used in base theme
|
||||||
# shellcheck source=./themes/githelpers.theme.bash
|
# shellcheck source=./themes/colors.theme.bash
|
||||||
source "${BASH_IT}/themes/githelpers.theme.bash"
|
source "${BASH_IT}/themes/colors.theme.bash"
|
||||||
# shellcheck source=./themes/p4helpers.theme.bash
|
# shellcheck source=./themes/githelpers.theme.bash
|
||||||
source "${BASH_IT}/themes/p4helpers.theme.bash"
|
source "${BASH_IT}/themes/githelpers.theme.bash"
|
||||||
# shellcheck source=./themes/base.theme.bash
|
# shellcheck source=./themes/p4helpers.theme.bash
|
||||||
source "${BASH_IT}/themes/base.theme.bash"
|
source "${BASH_IT}/themes/p4helpers.theme.bash"
|
||||||
|
# shellcheck source=./themes/base.theme.bash
|
||||||
|
source "${BASH_IT}/themes/base.theme.bash"
|
||||||
|
|
||||||
# appearance (themes) now, after all dependencies
|
# appearance (themes) now, after all dependencies
|
||||||
# shellcheck source=./lib/appearance.bash
|
# shellcheck source=./lib/appearance.bash
|
||||||
source "$APPEARANCE_LIB"
|
source "$APPEARANCE_LIB"
|
||||||
|
fi
|
||||||
|
|
||||||
# Load custom aliases, completion, plugins
|
# Load custom aliases, completion, plugins
|
||||||
for file_type in "aliases" "completion" "plugins"
|
for file_type in "aliases" "completion" "plugins"
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
# Path to the bash it configuration
|
# Path to the bash it configuration
|
||||||
export BASH_IT="{{BASH_IT}}"
|
export BASH_IT="{{BASH_IT}}"
|
||||||
|
|
||||||
# Lock and Load a custom theme file
|
# Lock and Load a custom theme file.
|
||||||
|
# Leave empty to disable theming.
|
||||||
# location /.bash_it/themes/
|
# location /.bash_it/themes/
|
||||||
export BASH_IT_THEME='bobby'
|
export BASH_IT_THEME='bobby'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue