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
Raw Normal View History

2017-01-09 12:02:02 -06:00
export DOTFILES_PATH="$HOME/.dotfiles"
export XDG_CONFIG_HOME="$HOME/.config"
2016-01-06 11:55:04 -06:00
# load our terminal colors
2016-01-06 11:55:04 -06:00
BASE16_SHELL="$DOTFILES_PATH/colors/shell"
[[ -s "$BASE16_SHELL" ]] && source "$BASE16_SHELL"
# if we're a proper terminal?
2016-07-14 15:22:19 -05:00
if [ -t 0 ]; then
# load variables
source "$DOTFILES_PATH/variables.bash"
2016-07-14 15:22:19 -05:00
# disable ctrl-s terminal freeze
[[ $- == *i* ]] && stty -ixon
# import our aliases
source "$DOTFILES_PATH/env/sh/aliases"
2016-07-14 15:22:19 -05:00
2017-01-20 00:12:59 -06:00
# import our global shell functions
source "$DOTFILES_PATH/env/sh/shell_funcs"
2016-07-14 15:22:19 -05:00
# import our prompt
source "$DOTFILES_PATH/env/sh/prompt"
# autocompletions
2016-07-14 15:22:19 -05:00
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"
2016-07-14 15:22:19 -05:00
fi
2016-08-30 17:14:27 -05:00
# 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
2016-09-20 03:07:33 -05:00
# prevents binds or commands pulling from history from insta-sending, and
# instead places them in the readline for editing
2016-11-21 16:17:11 -06:00
shopt -s histverify
# prevents some Java GUI apps from not working or rendering properly due to
# using bspwm
2016-11-26 18:20:00 -06:00
export _JAVA_AWT_WM_NONREPARENTING=1
2016-11-21 16:17:11 -06:00
# load our binds if we've got any inputs
2016-09-24 06:25:35 -05:00
bind -f "$HOME/.inputrc"
2016-01-06 11:55:04 -06:00
fi