Changed color schemes to a more legible one
This commit is contained in:
parent
cd494ba1da
commit
01a46e588f
2 changed files with 158 additions and 14 deletions
46
.zshrc
46
.zshrc
|
@ -24,6 +24,8 @@
|
|||
export LSCOLORS="Gxfxcxdxbxegedabagacad"
|
||||
export ZSH_CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/zsh"
|
||||
|
||||
export ZINIT_HOME_DIR=""
|
||||
|
||||
# Plugin setting >>>
|
||||
{
|
||||
# ZSH Vi Mode
|
||||
|
@ -193,6 +195,8 @@
|
|||
# prcolors(): Display all colors in a few different ways >>>
|
||||
# TODO: change this to make it not just a few scripts smashed together
|
||||
prcolors() {
|
||||
[ -z "$1" ] && 1=0
|
||||
if [ $1 -eq '1' ];then
|
||||
# Taken from manjaro's bashrc >>>
|
||||
local fgc bgc vals seq0
|
||||
|
||||
|
@ -219,16 +223,17 @@
|
|||
echo; echo
|
||||
done
|
||||
# <<<
|
||||
elif [ $1 -eq '2' ];then
|
||||
# from base16shell >>>
|
||||
ansi_mappings=(
|
||||
Black Red
|
||||
Green Yellow
|
||||
Blue Magenta
|
||||
Cyan White
|
||||
Bright_Black Bright_Red
|
||||
Bright_Green Bright_Yellow
|
||||
Bright_Blue Bright_Magenta
|
||||
Bright_Cyan Bright_White
|
||||
Red Green
|
||||
Yellow Blue
|
||||
Magenta Cyan
|
||||
White Black
|
||||
Bright_Red Bright_Green
|
||||
Bright_Yellow Bright_Blue
|
||||
Bright_Magenta Bright_Cyan
|
||||
Bright_White Bright_Black
|
||||
)
|
||||
colors=(
|
||||
base00 base08
|
||||
|
@ -255,19 +260,28 @@
|
|||
foreground=$(printf "\x1b[38;5;${non_padded_value}m$color_variable")
|
||||
printf "%s %s %s %-30s %s\x1b[0m\n" $foreground $base16_color_name $current_color_label ${ansi_label:-""} $block
|
||||
done;
|
||||
if [ $# -eq 1 ]; then
|
||||
printf "To restore current theme, source ~/.base16_theme or reopen your terminal\n"
|
||||
fi
|
||||
#if [ $# -eq 1 ]; then
|
||||
# printf "To restore current theme, source ~/.base16_theme or reopen your terminal\n"
|
||||
#fi
|
||||
# <<<
|
||||
elif [ $1 -eq '3' ];then
|
||||
# Similar to above, but does 256-bit colors. >>>
|
||||
# Taken from this: https://github.com/romkatv/powerlevel10k#set-colors-through-Powerlevel10k-configuration-parameters
|
||||
for i in {0..255}; do
|
||||
print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}
|
||||
done
|
||||
# <<<
|
||||
else
|
||||
cat <<-EOF
|
||||
Usage: prcolors <printing method number>
|
||||
1: Manjaro bashrc -- for checking text readability
|
||||
2: base26shell -- for seeing the 16 set terminal colors
|
||||
3: 256 -- for testing 256 color output
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
# <<<
|
||||
|
||||
|
||||
# shellcheck disable=SC2016
|
||||
mkcd() {
|
||||
mkdir -p "$1" || error $LINENO
|
||||
|
@ -356,9 +370,13 @@
|
|||
|
||||
# Themes
|
||||
# zplug "themes/robbyrussell", from:oh-my-zsh, as:theme
|
||||
zinit snippet 'https://github.com/chriskempson/base16-shell/blob/master/scripts/base16-onedark.sh' # onedark shell colors
|
||||
if [[ -f ~/.config/shell/colors.sh ]];then
|
||||
source ~/.config/shell/colors.sh
|
||||
else
|
||||
zinit snippet 'https://github.com/chriskempson/base16-shell/blob/master/scripts/base16-onedark.sh' # onedark shell colors
|
||||
fi
|
||||
zinit load "romkatv/powerlevel10k"
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
[[ -f ~/.p10k.zsh ]] && source ~/.p10k.zsh
|
||||
}
|
||||
# <<<
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue