summaryrefslogtreecommitdiff
path: root/zsh/.zsh/.zshrc
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2018-02-21 12:18:32 +0000
committerUrbain Vaes <urbain@vaes.uk>2018-02-21 16:46:29 +0000
commitb9ea238dd7e8a56b1d171cdc76e405bb2a8584dd (patch)
treed693deb61965b724cd8630e0a061e5e762341c9c /zsh/.zsh/.zshrc
parent68d822599f074c24505eea2329bfc80e2745feab (diff)
Improve i3 status
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 {{{