# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
unsetopt beep
bindkey -v

# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/dqnid/.zshrc'

autoload -Uz compinit
compinit
# End of lines added by compinstall

# Path
export NVM_DIR="$HOME/.nvm"
export PATH="/home/dqnid/.local/bin:$PATH"

export TERMINAL=/usr/local/bin/st

# Aliases
alias r=ranger
alias v=nvim
alias sv="sudo nvim"
alias n="nnn -e"
alias gs="git status --short"
alias gl="git log --graph --oneline --all"
alias nvm_init='[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"'
alias ls=lsd
alias zj=zellij

eval "$(starship init zsh)"
eval "$(zoxide init zsh)"

function y() {
	local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
	command yazi "$@" --cwd-file="$tmp"
	IFS= read -r -d '' cwd < "$tmp"
	[ "$cwd" != "$PWD" ] && [ -d "$cwd" ] && builtin cd -- "$cwd"
	rm -f -- "$tmp"
}

export EDITOR=nvim
export NVM_DIR="$HOME/.nvm"
# Slows start time
# [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

# bun completions
[ -s "/home/dqnid/.bun/_bun" ] && source "/home/dqnid/.bun/_bun"

# bun
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
export PATH="$HOME/.config/utils/:$PATH"
