# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
    . /etc/bashrc
fi

alias ls='ls --color=auto'
alias ll='ls -alh --color=auto'
alias grep='grep --color=auto'

if [ -f "${HOME}/.bash_aliases" ]; then
  source "${HOME}/.bash_aliases"
fi

# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then
    PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH

HISTSIZE=1000000

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions
if [ -d ~/.bashrc.d ]; then
    for rc in ~/.bashrc.d/*; do
        if [ -f "$rc" ]; then
            . "$rc"
        fi
    done
fi
unset rc
unset SSH_ASKPASS
unset GIT_ASKPASS

alias nvimc="nvim ~/.config/nvim"
alias bashrc="nvim ~/.bashrc"
alias vpy="source ./venv/bin/activate"
export XDG_CONFIG_HOME=~/.config
function fcd() {
    cd $(find . -type d -print | fzf);
}
export PATH="$HOME/.cargo/bin:$PATH"
. "$HOME/.cargo/env"

if [[ "$(echo $(cat /etc/*release | grep -e "^ID=" | tr -d 'ID='))" =~ "arch" ]]; then
    source /usr/share/fzf/key-bindings.bash
else
    source /usr/share/fzf/shell/key-bindings.bash
fi