move theming to lib/theme.zsh

This commit is contained in:
Dmytro Meleshko 2018-08-23 19:25:14 +02:00
parent d7810496d8
commit cd4bc05561
3 changed files with 16 additions and 9 deletions

View file

@ -35,13 +35,5 @@ configure_oh_my_zsh() {
fi
}
configure_zsh() {
[[ -f ~/.dircolors ]] && eval "$(dircolors ~/.dircolors)"
[[ -z "$LS_COLORS" ]] && eval "$(dircolors -b)"
zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}"
}
configure_oh_my_zsh
source "$ZSH/oh-my-zsh.sh"
configure_zsh

15
lib/theme.zsh Normal file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env zsh
configure_syntax_highlighting() {
source "$DOTFILES_PATH/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh"
}
configure_dircolors() {
[[ -f ~/.dircolors ]] && eval "$(dircolors ~/.dircolors)"
[[ -z "$LS_COLORS" ]] && eval "$(dircolors -b)"
zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}"
}
configure_syntax_highlighting
configure_dircolors

2
zshrc
View file

@ -1,7 +1,7 @@
#!/usr/bin/env zsh
if [[ -n "$DOTFILES_PATH" ]]; then
for script in functions path exports aliases oh-my-zsh widgets; do
for script in functions path exports aliases oh-my-zsh widgets theme; do
source "$DOTFILES_PATH/lib/$script.zsh"
done