Skip to content

Commit

Permalink
Add local overrides for Bash, Git, Vim, and tmux
Browse files Browse the repository at this point in the history
Allow for easier per-machine and one-off customizations.
  • Loading branch information
Pinjasaur committed Oct 8, 2017
1 parent 5147b26 commit bca2c29
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ shopt -s checkwinsize
# Enable globstar pattern matching (e.g. **/*.foobar)
shopt -s globstar

# Source z (https://github.com/rupa/z)
source ~/.bash/z/z.sh

# Load the shell dotfiles
for file in ~/.{exports,aliases,functions,bash_prompt,extras}; do
for file in ~/.{exports,aliases,functions,bash_prompt,locals}; do
[ -r "$file" ] && source "$file"
done
unset file

# Source z (https://github.com/rupa/z)
source ~/.bash/z/z.sh
8 changes: 6 additions & 2 deletions .gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,12 @@
template = ~/.gitmessage

[core]
# Custom .gitignore
excludesfile = ~/.gitignore_global
# Global .gitignore
excludesfile = ~/.gitignore.global

[include]
# Custom .gitconfig
path = ~/.gitconfig.local

[push]
default = simple
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.extras
.locals
.*.local
.cfg/
5 changes: 2 additions & 3 deletions .tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,5 @@ set -g status-left-length 30
set -g status-left '#[fg=green](#S) #(whoami)'
set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%H:%M#[default]'

# macOS fix for pbcopy/pbpaste
if-shell "uname | grep -q Darwin" \
'set -g default-command "reattach-to-user-namespace -l ${SHELL}"'
# Local config
if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local'
5 changes: 5 additions & 0 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,8 @@ if exists("+undofile")
set undodir+=~/.vim/undo//
set undofile
endif

" Local config
if filereadable($HOME . "/.vimrc.local")
source ~/.vimrc.local
endif

0 comments on commit bca2c29

Please sign in to comment.