# Load private secrets (e.g. BORG_PASSPHRASE, NETBIRD_SETUP_KEY) outside version control.
[[ -f ${XDG_CONFIG_HOME:-$HOME/.config}/secrets.env ]] && source ${XDG_CONFIG_HOME:-$HOME/.config}/secrets.env

# java jdk adaption
export JDK_TOOL_OPTIONS="-Djdk.xml.totalEntitySizeLimit=0"
# FZF
export FZF_CTRL_T_OPTS="--preview 'bat -n --color=always --line-range :500 {}'"
export FZF_ALT_C_OPTS="--preview 'eza --tree --color=always {} | head -200'"
export FZF_DEFAULT_OPTS="--height 50% --layout=default --border --color=hl:#2dd4bf --bind tab:accept"
export FZF_TMUX_OPTS=" -p90%,70% "

# FD
export FZF_DEFAULT_COMMAND="fd --hidden --strip-cwd-prefix --exclude .git"
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_ALT_C_COMMAND="fd --type=d --hidden --strip-cwd-prefix --exclude .g-t"

# temuxifier
export PATH="$HOME/.tmuxifier/bin:$PATH"

# yazi setup
export EDITOR="nvim"

# pyenv
export PYENV_ROOT="$HOME/.pyenv/"

# fuse
export BORG_FUSE_IMPL=pyfuse3

# borg podman
# Load from a secrets manager or private env file instead of dotfiles.
# export BORG_PASSPHRASE="..."

# manpager
export MANPAGER='nvim +Man!'

export XDG_CURRENT_DESKTOP=Niri
export XDG_SESSION_TYPE=wayland
export QT_QPA_PLATFORM=wayland
export SDL_VIDEODRIVER=wayland
export CLUTTER_BACKEND=wayland
export MOZ_ENABLE_WAYLAND=1

export PATH="$HOME/.local/share/nvim/mason/bin:$PATH"

# Bitwarde
# export BW_SESSION=$(bw unlock --raw)

# you-should-use settings (optional)
# export YSU_MESSAGE_POSITION="after" # Show reminder after command output
# export YSU_HARDCORE=0               # Prevent execution if alias exists (probably too aggressive)

export GTK_FILE_CHOOSER_BACKEND="yazi"

export OPENCODE_CONFIG_DIR=/mnt/flash1/opencode_data/
