update colors in tmux before the shell

This commit is contained in:
Fernando Schauenburg 2019-02-27 18:29:39 +01:00
parent f5f5d29c40
commit 48fd7fff4e

View file

@ -25,17 +25,6 @@ bashrc_customize_environment() {
export HISTFILE=~/.bash_eternal_history
}
bashrc_update_colors() {
export BACKGROUND="$1"
bashrc_customize_terminal_colors
bashrc_customize_prompt
bashrc_customize_ls
if [ -n "$TMUX" ] && [ -f "$HOME/.tmux.conf" ]; then
tmux set-environment -g BACKGROUND "$BACKGROUND"
tmux source-file "$HOME/.tmux.conf"
fi
}
bashrc_customize_shell_options() {
for option in cdspell checkwinsize globstar histappend nocaseglob
do
@ -92,6 +81,17 @@ EOS
export MANPATH
}
bashrc_update_colors() {
export BACKGROUND="$1"
if [ -n "$TMUX" ] && [ -f "$HOME/.tmux.conf" ]; then
tmux set-environment -g BACKGROUND "$BACKGROUND"
tmux source-file "$HOME/.tmux.conf"
fi
bashrc_customize_terminal_colors
bashrc_customize_prompt
bashrc_customize_ls
}
bashrc_customize_aliases() {
alias light='bashrc_update_colors "light"'
alias dark='bashrc_update_colors "dark"'