aboutsummaryrefslogtreecommitdiff
path: root/shell/colors
blob: 489179f9306641807a512ec548c95525249d6d5c (plain) (blame)
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

setcolorterminal() {
	case $TERM in
	xterm-kitty)
		# Prevent xterm-kitty from being turned into xterm-256color
		return;
	;;
	xterm*)
		export TERM=xterm-256color
		# printf $'\033]0;'"$(hostname)"$'\007';
	;;
	screen*)
		export TERM=screen-256color
		# printf $'\033k'"$(whoami)"$'\033\\';
	;;
	esac
}

setlscolors() {
	if [ "$(uname)" = "Linux" ] ; then
		export LS_COLORS='di=36;40:ln=1;31;40:so=32;40:pi=33;40:ex=1;32;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:'
	elif [ "$(uname)" = "FreeBSD" ] ; then
		export LSCOLORS='gxBxcxdxCxegedabagacad'
	fi
}

colormanpages() {
	export LESS_TERMCAP_mb=""
	export LESS_TERMCAP_md=""
	export LESS_TERMCAP_me=""
	export LESS_TERMCAP_se=""
	export LESS_TERMCAP_so=""
	export LESS_TERMCAP_ue=""
	export LESS_TERMCAP_us=""

	## Gentoo is nuts
	export GROFF_NO_SGR=1
}