ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
[ ! -d $ZINIT_HOME ] && mkdir -p "$(dirname $ZINIT_HOME)"
[ ! -d $ZINIT_HOME/.git ] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
source "${ZINIT_HOME}/zinit.zsh"

export HISTFILE="$HOME/.zsh_history"
export HISTSIZE=10000000
export SAVEHIST=10000000
export ZVM_CURSOR_STYLE_ENABLED=false

zinit load zsh-users/zsh-autosuggestions
zinit load zsh-users/zsh-syntax-highlighting
zinit load agkozak/agkozak-zsh-prompt
zinit ice depth=1; zinit light jeffreytse/zsh-vi-mode

export SYSTEMD_PAGER=

. "$HOME/.cargo/env"

export PATH=$HOME/.local/bin:$PATH

# Auto login to sway
if [[ $(tty) == "/dev/tty1" ]]; then
    sway
fi
