-
Notifications
You must be signed in to change notification settings - Fork 0
/
colorrc
52 lines (46 loc) · 1.14 KB
/
colorrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
## vim: set fenc=utf-8 ts=2 sw=0 sts=0 sr et si tw=0 fdm=marker fmr={{{,}}} ft=zsh:
##
## colorrc by Andy3153
## created 31/01/21 ~ 13:18:37
## remade 11/03/24 ~ 11:30:54
##
# {{{ Man colors
function man()
{
LESS_TERMCAP_md=$'\e[01;31m'\
LESS_TERMCAP_me=$'\e[0m'\
LESS_TERMCAP_se=$'\e[0m'\
LESS_TERMCAP_so=$'\e[01;44;33m'\
LESS_TERMCAP_ue=$'\e[0m'\
LESS_TERMCAP_us=$'\e[01;32m'\
\
command man "$@"
}
# }}}
# {{{ Use lsd if available
if command -v lsd &> /dev/null
then alias ls="lsd --color=auto --classify --group-dirs=first"
else
alias ls="ls --color=auto --classify --group-directories-first"
echo "recommend: install lsd"
fi
# }}}
# {{{ Use colordiff if available
if command -v colordiff &> /dev/null
then alias diff="colordiff"
else echo "recommend: install colordiff"
fi
# }}}
# {{{ Use nvimpager if available
if command -v nvimpager &> /dev/null
then export PAGER="nvimpager"
else echo "recommend: install nvimpager"
fi
# }}}
# {{{ Enable color in basic programs
alias grep="grep --color=auto"
alias ip="ip -color"
alias cmatrix="cmatrix -abC cyan"
alias tty-clock="tty-clock -sBcC 4"
alias ytop="ytop -apsm"
# }}}