summaryrefslogtreecommitdiff
path: root/zsh/.zsh/.zshrc
diff options
context:
space:
mode:
Diffstat (limited to 'zsh/.zsh/.zshrc')
-rw-r--r--zsh/.zsh/.zshrc19
1 files changed, 15 insertions, 4 deletions
diff --git a/zsh/.zsh/.zshrc b/zsh/.zsh/.zshrc
index 95e989e..07009b8 100644
--- a/zsh/.zsh/.zshrc
+++ b/zsh/.zsh/.zshrc
@@ -78,15 +78,14 @@ zle -N z
# }}}
## Colors {{{
-[[ -z ${ZSH_COLORS} ]] && ZSH_COLORS=${HOME}/.local/share/zsh/colors.zsh
-[[ -f ${ZSH_COLORS} ]] && source ${ZSH_COLORS}
+[[ -f $HOME/.local/colors.zsh ]] && source $HOME/.local/colors.zsh
colorschemes=$(ls ${HOME}/.Xresources)
function colo {
- XRESOURCE=$1
- XRESOURCE_FILE=${HOME}/.Xresources/${XRESOURCE}
+ COLORSCHEME=$1
+ XRESOURCE_FILE=${HOME}/.Xresources/$COLORSCHEME
# Change colors for current session
if [[ ! -z "$TMUX" ]]; then
@@ -105,11 +104,23 @@ function colo {
# Change color for future sessions
xrdb ${XRESOURCE_FILE}
+
+ echo "export COLORSCHEME=$1" > $HOME/.local/colors.zsh
+ source $HOME/.local/colors.zsh
}
# Completion for colorschemes (-M -> Case insensitive)
compctl -k "(${colorschemes})" -M 'm:{a-z}={A-Z}' colo
+function show256 {
+ for i in {0..255} ; do
+ printf "\x1b[48;5;%sm%3d\e[0m " "$i" "$i"
+ if (( i == 15 )) || (( i > 15 )) && (( (i-15) % 6 == 0 )); then
+ printf "\n";
+ fi
+ done
+}
+
# }}}
## Aliases {{{