reset color definitions before loading a new theme
This commit is contained in:
@@ -36,6 +36,8 @@
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Color definitions
|
||||
set_colors()
|
||||
{
|
||||
# Standard 16 colors display declaration
|
||||
export DEFAULTFG='\e[0;39m'
|
||||
export DEFAULTBG='\e[0;49m'
|
||||
@@ -111,6 +113,8 @@ export On_IBlue='\e[0;104m'
|
||||
export On_IPurple='\e[0;105m'
|
||||
export On_ICyan='\e[0;106m'
|
||||
export On_IWhite='\e[0;107m'
|
||||
}
|
||||
export -f set_colors
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -179,5 +183,6 @@ export -f disp
|
||||
|
||||
# Load disp section variables
|
||||
load_conf disp
|
||||
set_colors
|
||||
|
||||
# EOF
|
||||
|
||||
@@ -198,6 +198,9 @@ set_theme()
|
||||
|
||||
# -- apply mode ----------------------------------------------------------
|
||||
local theme_name="$1"
|
||||
|
||||
# Reset colours to defaults before loading the new theme
|
||||
set_colors
|
||||
load_theme "$theme_name" || return 1
|
||||
|
||||
export PROMPT_THEME="$theme_name"
|
||||
|
||||
Reference in New Issue
Block a user