#!/usr/bin/env bash

# set prefix if in termux
if uname -a | grep -q Android; then
  pathprefix=/data/data/com.termux/files
else
  pathprefix=
fi;

# fzf config
[ -f "$pathprefix/usr/share/fzf/completion.bash" ] && source "$pathprefix/usr/share/fzf/completion.bash"
[ -f "$pathprefix/usr/share/fzf/key-bindings.bash" ] && source "$pathprefix/usr/share/fzf/key-bindings.bash"

# goto
[ -f ~/skynet/scripts/goto.sh ] && source ~/skynet/scripts/goto.sh

# bash completion
test -e "$pathprefix/usr/share/bash-completion/bash_completion" && source "$pathprefix/usr/share/bash-completion/bash_completion"

# colorizer
GRC_ALIASES=true
test -e "$pathprefix/usr/share/grc/grc.sh" && source "$pathprefix/usr/share/grc/grc.sh"

# git bash completions
test -e ~/skynet/scripts/git-completion.bash && source ~/skynet/scripts/git-completion.bash

# nvm
test -e ~/.nvm/nvm.sh && source ~/.nvm/nvm.sh

test -e ~/.cargo/env && source ~/.cargo/env

# bat theme
BAT_THEME='Catppuccin-mocha'

# nnn color config
NNN_PLUG='d:dragdrop;i:imgview'
NNN_PREVIEWDIR="$HOME/.cache/nnn/previews"
BLK="03" CHR="03" DIR="04" EXE="02" REG="07" HARDLINK="05" SYMLINK="05" MISSING="08" ORPHAN="01" FIFO="06" SOCK="03" UNKNOWN="01"
NNN_COLORS="#04020301;4231"
NNN_FCOLORS="$BLK$CHR$DIR$EXE$REG$HARDLINK$SYMLINK$MISSING$ORPHAN$FIFO$SOCK$UNKNOWN"

export GRC_ALIASES BAT_THEME NNN_PLUG NNN_PREVIEWDIR NNN_COLORS NNN_FCOLORS

# google cloud sdk

# The next line updates PATH for the Google Cloud SDK.
if [ -f '/home/rudism/.local/opt/google-cloud-sdk/path.bash.inc' ]; then . '/home/rudism/.local/opt/google-cloud-sdk/path.bash.inc'; fi

# The next line enables shell command completion for gcloud.
if [ -f '/home/rudism/.local/opt/google-cloud-sdk/completion.bash.inc' ]; then . '/home/rudism/.local/opt/google-cloud-sdk/completion.bash.inc'; fi
