dotfiles/.config/zsh/lib/30-colors.zsh

25 lines
672 B
Bash
Raw Normal View History

2016-04-16 16:31:54 +02:00
typeset -Ag FX FG BG
## Set Colors on BSD system
2020-06-02 23:19:46 +02:00
LSCOLORS="gxfxcxdxbxegedabagacad"
2020-06-02 23:16:52 +02:00
CLICOLOR="YES"
2016-04-16 16:31:54 +02:00
## Load .dir_colors for GNU systems
2020-12-06 11:53:43 +01:00
if command -v dircolors &> /dev/null; then
test -r "$XDG_CONFIG_HOME/dircolors" && eval $(dircolors "$XDG_CONFIG_HOME"/dircolors)
fi
2016-04-16 16:31:54 +02:00
FX=(
reset "%{%}"
bold "%{%}" no-bold "%{%}"
italic "%{%}" no-italic "%{%}"
underline "%{%}" no-underline "%{%}"
blink "%{%}" no-blink "%{%}"
reverse "%{%}" no-reverse "%{%}"
)
for color in {000..255}; do
FG[$color]="%{[38;5;${color}m%}"
BG[$color]="%{[48;5;${color}m%}"
done