This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/env/sh/bashrc

52 lines
1.4 KiB
Bash

export DOTFILES_PATH="$HOME/.dotfiles"
export XDG_CONFIG_HOME="$HOME/.config"
# load our terminal colors
BASE16_SHELL="$DOTFILES_PATH/colors/shell"
[[ -s "$BASE16_SHELL" ]] && source "$BASE16_SHELL"
# if we're a proper terminal?
if [ -t 0 ]; then
# load variables
source "$DOTFILES_PATH/variables.bash"
# disable ctrl-s terminal freeze
[[ $- == *i* ]] && stty -ixon
# import our aliases
source "$DOTFILES_PATH/env/sh/aliases"
# import our global shell functions
source "$DOTFILES_PATH/env/sh/shell_funcs"
# import our prompt
source "$DOTFILES_PATH/env/sh/prompt"
# autocompletions
complete -cf sudo
complete -cf man
# allow a per-device script that is pulled in
if [ -a "$HOME/.bashrc_env" ]; then
source "$HOME/.bashrc_env"
fi
# this bashrc assumes a home directory like /home/username/usr in order to
# keep dotfiles from cluttering up an "actual" home directory /home/username
# this snippet will redirect new terminals to the "actual" home directory
if [ "$PWD" = "$HOME" ]; then
cd "$HOME/.."
fi
# prevents binds or commands pulling from history from insta-sending, and
# instead places them in the readline for editing
shopt -s histverify
# prevents some Java GUI apps from not working or rendering properly due to
# using bspwm
export _JAVA_AWT_WM_NONREPARENTING=1
# load our binds if we've got any inputs
bind -f "$HOME/.inputrc"
fi