Browse Source

Remove flags until the file gets bigger, fix prompt officially so it stops overwriting

master
Taylor Bockman 4 years ago
parent
commit
b11567d3d9
  1. 6
      README.md
  2. 39
      dotfiles/bash/bashrc

6
README.md

@ -44,6 +44,12 @@ To rebind capslock and escape in XFCE paste the following command in your termin
`/usr/bin/setxkbmap -option "caps:swapescape"`
To make it permanent, add it to your XFCE startup items via:
`xfce4-settings-manager`
and then `Session and Startup > Application autostart` using an `onlogin` trigger.
```
pip install pynvim
```

39
dotfiles/bash/bashrc

@ -14,26 +14,41 @@ else
symlink_dir=$(cd "$( dirname "`readlink ${BASH_SOURCE[0]}`" )" && pwd)
fi
# -------------------------------- SETUP -------------------------------- #
# Store private information (exports, keys, etc) in .bash_private.
if [[ -f ~/.bash_private ]]; then
source ~/.bash_private
if [[ -f $HOME/.bash_private ]]; then
source $HOME/.bash_private
echo ".bash_private loaded"
fi
if [ -f ~/.inputrc ]; then
bind -f ~/.inputrc
if [ -f $HOME/.inputrc ]; then
bind -f $HOME/.inputrc
else
echo "No .inputrc detected"
fi
if [[ "$OSTYPE" == "darwin"* ]]; then
if [ -f ~/.macrc ]; then
source ~/.macrc
if [ -f $HOME/.macrc ]; then
source $HOME/.macrc
fi
fi
# Set up projects and gopath folder properly for the export in the export section.
if [[ ! -d $HOME/projects ]]; then
echo "Making $HOME/projects"
mkdir -p $HOME/projects
fi
if [[ -x go ]]; then
echo "Making $HOME/projects/go"
mkdir -p $HOME/projects/go
fi
# ------------------------------ END SETUP ------------------------------ #
@ -77,6 +92,12 @@ export PATH="/usr/local/opt/openjdk/bin:$PATH"
# Ignore duplicates in history to make history less of a hassle to use.
export HISTCONTROL=ignoredups
# If go is installed, set the $GOPATH to the projects directory created above.
if [[ -x go ]]; then
export GOPATH=$HOME/projects/go
fi
# ------------ END EXPORTS ------------#
@ -108,9 +129,11 @@ export PROMPT_DIRTRIM=2
# Important note for PS1 modification - everything non-printable must be escaped with `\[` and `\]`. Otherwise readline
# fails to track the prompt right and things get messed up when you input long strings.
GIT_BRANCH=$(parse_git_branch)
if [[ "$OSTYPE" == "linux-gnu" ]]; then
# I had some rendering issues running in XFCE unless I added an extra space at the end.
export PS1='\[$bold\]\[$white\]\u@\h\[$reset\]: \[$bold\]\[$blue\]\w\[$reset\] \[$green\]\[$(parse_git_branch)\]\[$reset\]\[$bold\]\[$white\]⇨\[$reset\] '
export PS1='\[$bold\]\[$white\]\u@\h\[$reset\]: \[$bold\]\[$blue\]\w\[$reset\] \[$green\]$GIT_BRANCH\[$reset\]\[$bold\]\[$white\]⇨\[$reset\] '
else
export PS1='\[$bold\]\[$white\]\u@\h\[$reset\]: \[$bold\]\[$blue\]\w\[$reset\] \[$green\]\[$(parse_git_branch)\]\[$reset\]\[$bold\]\[$white\]⇨\[$reset\] '
export PS1='\[$bold\]\[$white\]\u@\h\[$reset\]: \[$bold\]\[$blue\]\w\[$reset\] \[$green\]$GIT_BRANCH\[$reset\]\[$bold\]\[$white\]⇨\[$reset\] '
fi

Loading…
Cancel
Save