summaryrefslogtreecommitdiff
path: root/common/home/programs/zsh/init.sh
blob: 6ad3721f77e44ccc0f8d405076dd0d375c05a49c (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"

prompt_git_status() {
	if [ -n "$(git branch 2>/dev/null)" ]; then
		sign="";
	[[ -n "$(git status -s)" ]] && sign="";
	git_branch=$(git branch);
	echo "%F{5}%f%F{0}%K{5}''${sign} ''${git_branch##*\* }%k%F{5}%k";
	fi;
}

update_prompt() {
	export RPROMPT="$(prompt_git_status)"
}

PROMPT="%F{cyan}%F{0}%K{cyan}%n%k%f%F{cyan}%k%f %F{cyan}%f%k%K{cyan}%F{0}%m%k%f%F{cyan}%k %f%k%F{magenta}%F{0}%K{magenta}%~%f%k%F{magenta}%k%f "
TIME

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 ))
printf "\x1b[34m\n"
toilet -f future "$days_with_janina, $days_together_with_janina days"
printf "\x1b[0m\n"