HISTFILE="$XDG_DATA_HOME/zsh/histfile"
HISTSIZE=999999999
SAVEHIST="$HISTSIZE"

# Key (zshmisc(1)):
#
# '%F{$color}$x%f': Change foreground color of $x to $color
# '%B$x%b': Make $x bold
# '%n': $USER
# '%M': $HOST
# '%1~': $PWD, but shows '~' if at $HOME
# '%(?.#.%?)':
# '%n(x.true.false)' evaluates ternary expression for condition x, where n
# is an integer, by default '0':
# '?': If the last command’s exit status was 0, true
# '#': Prints literal '#' to the prompt
# '[%?]': Prints the last exit status with literal brackets surrounding it

ERR='[%f%F{green}%?%f%F{blue}]%f'
ERR_LINE="%(?.#.$ERR)"

LINE1='%F{blue}╭%f %B%F{blue}%n%f@%F{magenta}%M%f%b'
LINE2='%F{blue}│%f %F{green}%B%0~%b%f'
LINE3="%F{blue}╰─$ERR_LINE%f "

PS1="$(printf "%s\n%s\n%s" "$LINE1" "$LINE2" "$LINE3")"; export PS1

GPG_TTY="$(tty)"; export GPG_TTY
