summaryrefslogtreecommitdiff
path: root/common/home/programs/zsh/init.sh
blob: 06db11dcb2d4e2fbf49e9b7ffcd1e1f0687194bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
export MANROFFOPT="-c"

esc() {
	for e in "$@"; do
		printf "\x1b[${e}m"
	done
}

PROMPT='%F{0}%B%(?.%K{green} .%K{red} %?) %k%f >%b '
RPROMPT='%F{0}%B %K{blue} %n %k %K{magenta} %~ %k%f%b'
PROMPT2='%B%F{0}%(?.   .%K{red} %? %k)%f +%b '

TIMEFMT="$(esc 1 32) >$(esc 0 3 2) %J $(esc 0) $(esc 43 30 1)  %*Us $(esc 0) $(esc 42 30 1) 󰌽 %*Ss $(esc 0) $(esc 46) 󰥔 %*Es $(esc 0) $(esc 0 45 1)  %P $(esc 0)"

days_until=$(( ($(date +%s -ud '2028-05-27') - $(date +%s)) / 3600 / 24 ))
days_with_janina=$(( ($(date +%s) - $(date +%s -ud '2025-08-14')) / 3600 / 24 ))
days_together_with_janina=$(( ($(date +%s) - $(date +%s -ud '2025-09-27')) / 3600 / 24 ))

esc 34
echo
toilet -f future "$days_with_janina, $days_together_with_janina, $days_until days"
echo
esc 0