From 14c303f25df1b963f9ad093cfb043b8c916e2038 Mon Sep 17 00:00:00 2001 From: lhark Date: Thu, 19 Jul 2018 21:09:03 -0400 Subject: [PATCH] Add FSH theme customization --- fsh_theme.zsh | 47 +++++++++++++++++++++++++++++++++++++++++++++++ install.sh | 3 +++ 2 files changed, 50 insertions(+) create mode 100644 fsh_theme.zsh diff --git a/fsh_theme.zsh b/fsh_theme.zsh new file mode 100644 index 0000000..9f77dff --- /dev/null +++ b/fsh_theme.zsh @@ -0,0 +1,47 @@ +zstyle :plugin:fast-syntax-highlighting theme "default" +typeset -g FAST_THEME_NAME="default" +: ${FAST_HIGHLIGHT_STYLES[defaultdefault]:=none} +: ${FAST_HIGHLIGHT_STYLES[defaultunknown-token]:=fg=red,bold} +: ${FAST_HIGHLIGHT_STYLES[defaultreserved-word]:=fg=yellow} +: ${FAST_HIGHLIGHT_STYLES[defaultalias]:=fg=green} +: ${FAST_HIGHLIGHT_STYLES[defaultsuffix-alias]:=fg=green} +: ${FAST_HIGHLIGHT_STYLES[defaultbuiltin]:=fg=green} +: ${FAST_HIGHLIGHT_STYLES[defaultfunction]:=fg=green} +: ${FAST_HIGHLIGHT_STYLES[defaultcommand]:=fg=green} +: ${FAST_HIGHLIGHT_STYLES[defaultprecommand]:=fg=green} +: ${FAST_HIGHLIGHT_STYLES[defaultcommandseparator]:=none} +: ${FAST_HIGHLIGHT_STYLES[defaulthashed-command]:=fg=green} +: ${FAST_HIGHLIGHT_STYLES[defaultpath]:=fg=white,underline} +: ${FAST_HIGHLIGHT_STYLES[defaultpath_pathseparator]:=} +: ${FAST_HIGHLIGHT_STYLES[defaultglobbing]:=fg=blue,bold} +: ${FAST_HIGHLIGHT_STYLES[defaulthistory-expansion]:=fg=blue,bold} +: ${FAST_HIGHLIGHT_STYLES[defaultsingle-hyphen-option]:=fg=cyan} +: ${FAST_HIGHLIGHT_STYLES[defaultdouble-hyphen-option]:=fg=cyan} +: ${FAST_HIGHLIGHT_STYLES[defaultback-quoted-argument]:=none} +: ${FAST_HIGHLIGHT_STYLES[defaultsingle-quoted-argument]:=fg=yellow} +: ${FAST_HIGHLIGHT_STYLES[defaultdouble-quoted-argument]:=fg=yellow} +: ${FAST_HIGHLIGHT_STYLES[defaultdollar-quoted-argument]:=fg=yellow} +: ${FAST_HIGHLIGHT_STYLES[defaultback-or-dollar-double-quoted-argument]:=fg=cyan} +: ${FAST_HIGHLIGHT_STYLES[defaultback-dollar-quoted-argument]:=fg=cyan} +: ${FAST_HIGHLIGHT_STYLES[defaultassign]:=none} +: ${FAST_HIGHLIGHT_STYLES[defaultredirection]:=none} +: ${FAST_HIGHLIGHT_STYLES[defaultcomment]:=fg=black,bold} +: ${FAST_HIGHLIGHT_STYLES[defaultvariable]:=fg=113} +: ${FAST_HIGHLIGHT_STYLES[defaultmathvar]:=fg=blue,bold} +: ${FAST_HIGHLIGHT_STYLES[defaultmathnum]:=fg=magenta} +: ${FAST_HIGHLIGHT_STYLES[defaultmatherr]:=fg=red} +: ${FAST_HIGHLIGHT_STYLES[defaultassign-array-bracket]:=fg=green} +: ${FAST_HIGHLIGHT_STYLES[defaultfor-loop-variable]:=none} +: ${FAST_HIGHLIGHT_STYLES[defaultfor-loop-number]:=fg=magenta} +: ${FAST_HIGHLIGHT_STYLES[defaultfor-loop-operator]:=fg=yellow} +: ${FAST_HIGHLIGHT_STYLES[defaultfor-loop-separator]:=fg=yellow,bold} +: ${FAST_HIGHLIGHT_STYLES[defaultexec-descriptor]:=fg=yellow,bold} +: ${FAST_HIGHLIGHT_STYLES[defaulthere-string-tri]:=fg=yellow} +: ${FAST_HIGHLIGHT_STYLES[defaulthere-string-word]:=bg=blue} +: ${FAST_HIGHLIGHT_STYLES[defaultsecondary]:=} +: ${FAST_HIGHLIGHT_STYLES[defaultcase-input]:=fg=green} +: ${FAST_HIGHLIGHT_STYLES[defaultcase-parentheses]:=fg=yellow} +: ${FAST_HIGHLIGHT_STYLES[defaultcase-condition]:=bg=blue} +: ${FAST_HIGHLIGHT_STYLES[defaultcorrect-subtle]:=bg=blue} +: ${FAST_HIGHLIGHT_STYLES[defaultincorrect-subtle]:=fg=red} +: ${FAST_HIGHLIGHT_STYLES[defaultsubtle-bg]:=bg=blue} diff --git a/install.sh b/install.sh index 95f733a..2c3ee6b 100755 --- a/install.sh +++ b/install.sh @@ -16,6 +16,9 @@ fi # Init or update submodules git submodule update --init --recursive +# Setup fast-syntax-highlighting theme customization +cp "$SCRIPTPATH/fsh_theme.zsh" "$SCRIPTPATH/current_theme.zsh" + # Create symbolic links in the user's home dir for file in $FILES do