Skip to content

Commit

Permalink
Move configs into .config and local configs into .local
Browse files Browse the repository at this point in the history
- bash
- Brewfile
- inputrc
- tmux
  • Loading branch information
jawang35 committed Dec 4, 2019
1 parent 08a3722 commit d016c9f
Show file tree
Hide file tree
Showing 19 changed files with 44 additions and 40 deletions.
33 changes: 1 addition & 32 deletions .bash_profile
Original file line number Diff line number Diff line change
@@ -1,38 +1,7 @@
#!/usr/bin/env bash

if command -v brew >/dev/null 2>&1 && [ -f "$(brew --prefix)/etc/profile.d/bash_completion.sh" ]; then
source "$(brew --prefix)/etc/profile.d/bash_completion.sh"
fi

# Git completion for aliases
if command -v __git_complete > /dev/null 2>&1; then
__git_complete config __git_main
__git_complete g __git_main
__git_complete ga _git_add
__git_complete gb _git_branch
__git_complete gco _git_checkout
__git_complete gcob _git_checkout
__git_complete gd _git_diff
__git_complete gf _git_fetch
__git_complete gl _git_log
__git_complete gm _git_merge
__git_complete gpu _git_push
__git_complete gpuf _git_push
__git_complete gpd _git_pull
__git_complete gr _git_rebase
__git_complete gs _git_status
fi

if command -v direnv > /dev/null 2>&1; then
eval "$(direnv hook bash)"
fi

for file in ${HOME}/.{bash_prompt,aliases,exports,functions,bash_profile.local}; do
for file in "${HOME}"/.{config,local}/bash/*; do
if [ -f "${file}" ]; then
source "${file}"
fi
done

if [ -z "${TMUX}" ] && command -v neofetch > /dev/null 2>&1; then
neofetch
fi
2 changes: 1 addition & 1 deletion Brewfile → .config/Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ cask 'kitty'
cask 'scroll-reverser'
cask 'slack'

BREWFILE_LOCAL = File.join(ENV['HOME'], 'Brewfile.local')
BREWFILE_LOCAL = File.join(ENV['HOME'], '.local', 'Brewfile')
if File.file?(BREWFILE_LOCAL)
instance_eval(File.read(BREWFILE_LOCAL))
end
File renamed without changes.
3 changes: 3 additions & 0 deletions .exports → .config/bash/exports
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

export INPUTRC="${HOME}/.config/inputrc"
export HOMEBREW_BUNDLE_FILE="${HOME}/.config/Brewfile"

# Set EDITOR variable to nvim/vim
if [ -f /usr/local/bin/nvim ]; then
export EDITOR=/usr/local/bin/nvim
Expand Down
File renamed without changes.
32 changes: 32 additions & 0 deletions .config/bash/profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash

if command -v brew >/dev/null 2>&1 && [ -f "$(brew --prefix)/etc/profile.d/bash_completion.sh" ]; then
source "$(brew --prefix)/etc/profile.d/bash_completion.sh"
fi

# Git completion for aliases
if command -v __git_complete > /dev/null 2>&1; then
__git_complete config __git_main
__git_complete g __git_main
__git_complete ga _git_add
__git_complete gb _git_branch
__git_complete gco _git_checkout
__git_complete gcob _git_checkout
__git_complete gd _git_diff
__git_complete gf _git_fetch
__git_complete gl _git_log
__git_complete gm _git_merge
__git_complete gpu _git_push
__git_complete gpuf _git_push
__git_complete gpd _git_pull
__git_complete gr _git_rebase
__git_complete gs _git_status
fi

if command -v direnv > /dev/null 2>&1; then
eval "$(direnv hook bash)"
fi

if [ -z "${TMUX}" ] && command -v neofetch > /dev/null 2>&1; then
neofetch
fi
2 changes: 1 addition & 1 deletion .bash_prompt → .config/bash/prompt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

# Bash prompt based on the PaperColor theme.
# Bash prompt based on the onehalfdark theme.

function __bash_prompt_user_host {
printf "%s@%s" \\u \\h
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion .config/kitty/kitty.conf
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ inactive_tab_font_style normal

#: Color scheme {{{

include ~/themes/onehalf/kitty/onehalf-dark.conf
include ~/.themes/onehalf/kitty/onehalf-dark.conf

# foreground #dddddd
# background #000000
Expand Down
2 changes: 1 addition & 1 deletion .config/nvim/bundles/vim/all/onehalf
File renamed without changes.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
path = .config/nvim/bundles/vim/all/lightline.vim
url = https://github.com/itchyny/lightline.vim.git
[submodule "onehalf"]
path = themes/onehalf
path = .themes/onehalf
url = https://github.com/jawang35/onehalf.git
[submodule "promptline.vim"]
path = .config/nvim/bundles/utils/promptline.vim
Expand Down
Empty file added .local/bash/.gitkeep
Empty file.
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion .tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'reattach-to-user-names
set -g default-terminal 'screen-256color'
set -sa terminal-overrides ',xterm-256color:RGB'

run-shell '~/themes/tmux-styles.sh'
run-shell '~/.config/tmux/onehalfdark.tmux'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ $ config submodule update --init --recursive

## Homebrew

Packages and applications are managed with the [Brewfile](Brewfile) using [Homebrew](https://brew.sh/). `Brewfile.local` is optionally loaded to manage local dependencies.
Packages and applications are managed with the [Brewfile](.config/Brewfile) using [Homebrew](https://brew.sh/). `Brewfile.local` is optionally loaded to manage local dependencies.

To install missing dependencies:

Expand Down
2 changes: 1 addition & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ git clone --bare https://github.com/jawang35/.dotfiles.git "${HOME}/.dotfiles.gi
git --git-dir="${HOME}/.dotfiles.git" --work-tree="${HOME}" checkout
git --git-dir="${HOME}/.dotfiles.git" --work-tree="${HOME}" submodule update --init --recursive
if command -v brew >/dev/null 2>&1; then
brew update && brew bundle --file="${HOME}/Brewfile"
brew update && brew bundle
fi

# shellcheck source=.bash_profile
Expand Down

0 comments on commit d016c9f

Please sign in to comment.