diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index e151743..19f7b5d 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -186,7 +186,8 @@ preexec_functions=(${(u)preexec_functions}) [[ -d "${ZDOTDIR}"/functions ]] && autoload -Uz "${ZDOTDIR}"/functions/* local DEFAULT_USER="${DEFAULT_USER:-tastytea}" -[[ -f ${ZDOTDIR}/tastytea.zsh-theme ]] && source ${ZDOTDIR}/tastytea.zsh-theme +[[ -f "${ZDOTDIR}"/themes/prompt.zsh ]] && source "${ZDOTDIR}"/themes/prompt.zsh +[[ -f "${ZDOTDIR}"/themes/syntax-tastytea.zsh ]] && source "${ZDOTDIR}"/themes/syntax-tastytea.zsh return 0 diff --git a/.config/zsh/tastytea.zsh-theme b/.config/zsh/themes/prompt.zsh similarity index 99% rename from .config/zsh/tastytea.zsh-theme rename to .config/zsh/themes/prompt.zsh index eba1b24..b1ac34b 100644 --- a/.config/zsh/tastytea.zsh-theme +++ b/.config/zsh/themes/prompt.zsh @@ -1,4 +1,3 @@ -# -*- mode: shell-script; -*- # Zsh theme. Changes prompt and syntax highlighting. Needs Zsh >= 5.0.0. # Asynchronous prompt if zsh-async is detected, syntax highlighting if # zsh-syntax-highlighting is detected. diff --git a/.config/zsh/themes/syntax-tastytea.zsh b/.config/zsh/themes/syntax-tastytea.zsh new file mode 100644 index 0000000..6a27705 --- /dev/null +++ b/.config/zsh/themes/syntax-tastytea.zsh @@ -0,0 +1,53 @@ +# zsh-syntax-highlighting theme +# https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md + +function() +{ + + +if [[ -n "${ZSH_HIGHLIGHT_VERSION}" ]]; then + zsh_theme_colours[cmd]="213" # light pink + zsh_theme_colours[word]="172" # orange + zsh_theme_colours[misc]="81" # cyan + zsh_theme_colours[variable]="204" # salmon + zsh_theme_colours[quote]="76" # green + zsh_theme_colours[comment]="60" # dark violet + zsh_theme_colours[error]="207" # bright pink + + ZSH_HIGHLIGHT_STYLES[command]="fg=${zsh_theme_colours[cmd]}" + ZSH_HIGHLIGHT_STYLES[function]="fg=${zsh_theme_colours[cmd]}" + ZSH_HIGHLIGHT_STYLES[alias]="fg=${zsh_theme_colours[cmd]}" + ZSH_HIGHLIGHT_STYLES[builtin]="fg=${zsh_theme_colours[cmd]}" + ZSH_HIGHLIGHT_STYLES[precommand]="fg=${zsh_theme_colours[cmd]},underline" + ZSH_HIGHLIGHT_STYLES[arg0]="fg=${zsh_theme_colours[cmd]}" + + ZSH_HIGHLIGHT_STYLES[reserved-word]="fg=${zsh_theme_colours[word]}" + + ZSH_HIGHLIGHT_STYLES[commandseparator]="fg=${zsh_theme_colours[misc]}" + ZSH_HIGHLIGHT_STYLES[globbing]="fg=${zsh_theme_colours[misc]}" + ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter]="fg=${zsh_theme_colours[misc]},bold" + ZSH_HIGHLIGHT_STYLES[process-substitution-delimiter]="fg=${zsh_theme_colours[misc]},bold" + ZSH_HIGHLIGHT_STYLES[back-quoted-argument-delimiter]="fg=${zsh_theme_colours[misc]},bold" + ZSH_HIGHLIGHT_STYLES[redirection]="fg=${zsh_theme_colours[misc]}" + ZSH_HIGHLIGHT_STYLES[bracket-level-1]='fg=${zsh_theme_colours[misc]}' + ZSH_HIGHLIGHT_STYLES[bracket-level-2]='fg=${zsh_theme_colours[misc]}' + ZSH_HIGHLIGHT_STYLES[bracket-level-3]='fg=${zsh_theme_colours[misc]}' + ZSH_HIGHLIGHT_STYLES[bracket-level-4]='fg=${zsh_theme_colours[misc]}' + + ZSH_HIGHLIGHT_STYLES[arithmetic-expansion]="fg=${zsh_theme_colours[variable]}" + ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]="fg=${zsh_theme_colours[variable]}" + ZSH_HIGHLIGHT_STYLES[history-expansion]="fg=${zsh_theme_colours[variable]}" + ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]="fg=${zsh_theme_colours[variable]}" + + ZSH_HIGHLIGHT_STYLES[single-quoted-argument]="fg=${zsh_theme_colours[quote]}" + ZSH_HIGHLIGHT_STYLES[double-quoted-argument]="fg=${zsh_theme_colours[quote]}" + ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]="fg=${zsh_theme_colours[quote]}" + ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]="fg=${zsh_theme_colours[quote]}" + + ZSH_HIGHLIGHT_STYLES[comment]="fg=${zsh_theme_colours[comment]}" + + ZSH_HIGHLIGHT_STYLES[unknown-token]="fg=${zsh_theme_colours[error]},bold,standout" + ZSH_HIGHLIGHT_STYLES[bracket-error]="fg=${zsh_theme_colours[error]},bold,standout" +fi + +}