69 lines
2.3 KiB
Bash
69 lines
2.3 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
export XDG_CONFIG_HOME="$HOME/.config"
|
|
export DOTFILES_PATH="$XDG_CONFIG_HOME/dotfiles"
|
|
|
|
. "$DOTFILES_PATH/bin/prelude"
|
|
|
|
[[ ! $- == *i* ]] && return # stop parsing on a non-interactive shell
|
|
|
|
. "$DOTFILES_PATH/apps/shell/bash/aliases"
|
|
. "$DOTFILES_PATH/apps/shell/bash/autocompletions"
|
|
. "$DOTFILES_PATH/apps/shell/bash/prompt"
|
|
|
|
stty -ixon # disable ctrl-s terminal freezing
|
|
bind -f "$DOTFILES_PATH/apps/shell/inputrc" # load our key
|
|
# load our vconsole colors if in a tty
|
|
if [[ "${TERM%%-*}" = 'linux' ]]; then
|
|
c="$DOTFILES_PATH/bin/lib/colors/vconsole"
|
|
[[ -s "$c" ]] && . "$c"
|
|
fi
|
|
|
|
# load our shell colors
|
|
c="$DOTFILES_PATH/bin/lib/colors/shell"
|
|
[[ -s "$c" ]] && . "$c"
|
|
|
|
# prevents some Java GUI apps from not working or rendering properly due to
|
|
# using wacky window managers
|
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
|
export ERL_AFLAGS="-kernel shell_history enabled -kernel shell_history_file_bytes 1024000"
|
|
has_command fd && export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git'
|
|
export LS_COLORS='ow=01;36;40'
|
|
export LESS="-x2" # less tab size of 2 spaces
|
|
export TERMINAL="urxvtc"
|
|
export BROWSER="firefox-developer-edition"
|
|
export HISTFILESIZE="10000000" # "unlimited" history
|
|
export HISTSIZE="10000000" # "unlimited" history
|
|
export HISTCONTROL=ignoreboth # ignore duplicates and commands starting with space (" ")
|
|
shopt -s globstar # allow ** recursive wildcard globbing
|
|
# prevents binds or commands pulling from history from insta-sending, and
|
|
# instead places them in the readline for editing
|
|
shopt -s histverify
|
|
shopt -s histappend # always _append_ to bash history
|
|
shopt -s cmdhist # ensure command history is comprised of single lines
|
|
HISTIGNORE='ls:ll:la' # ignore certain commands
|
|
|
|
# set our EDITOR to neovim if we've got it
|
|
export EDITOR="vim"
|
|
if has_command nvim; then
|
|
alias vim="nvim"
|
|
alias ovim="\\vim"
|
|
export EDITOR="nvim"
|
|
fi
|
|
|
|
# load a per-device config last so anything can be overridden
|
|
. maybe_source_env_file bash
|
|
|
|
# create paths we kind of expect to exist in some scripts
|
|
mkdir -p "${NOTES_PATH}"
|
|
|
|
# open nice home instead if we're opening at home
|
|
[ "$PWD" = "$HOME" ] && cd "$NICE_HOME" || cd || return
|
|
|
|
[ -f "$HOME/.fzf.bash" ] && . "$HOME/.fzf.bash"
|
|
|
|
if [[ -d "$HOME/.asdf/" ]] && [[ -f "$HOME/.asdf/asdf.sh" ]]; then
|
|
. "$HOME/.asdf/asdf.sh"
|
|
elif [[ -d /opt/asdf-vm/ ]] && [[ -f /opt/asdf-vm/asdf.sh ]]; then
|
|
. "/opt/asdf-vm/asdf.sh"
|
|
fi
|