1 Commits

Author SHA1 Message Date
  juan d08f39a5a1 Clean up 4 years ago
7 changed files with 44 additions and 6 deletions
Split View
  1. +39
    -0
      common/.bashrc
  2. +1
    -1
      common/aliases.sh
  3. +0
    -1
      macos/.config/yabai/yabairc
  4. +1
    -1
      macos/cleanup.sh
  5. +1
    -1
      macos/env.sh
  6. +1
    -1
      zsh/.zshenv
  7. +1
    -1
      zsh/.zshrc

+ 39
- 0
common/.bashrc View File

@ -0,0 +1,39 @@
export DOTFILES=$(cd "$(dirname "$HOME/$(readlink $HOME/.zshenv)")" && cd .. && pwd)
source "$DOTFILES/helpers"
cleanup_helpers
# Load env files
for file in $DOTFILES/*/env.sh; do
if [[ "$(basename $(dirname $file))" != "zsh" ]]; then
source "$file"
fi
done
# Load additional sh files
for file in $DOTFILES/*/*.sh; do
if [[ "$(basename $file)" != env.sh ]] && [[ "$(basename $(dirname $file))" != "zsh" ]]; then
source "$file"
fi
done
# Set up prompt
function _prompt_command() {
local retval=$?
local green="\[$(tput setaf 2)\]"
local blue="\[$(tput setaf 4)\]"
local reset="\[$(tput sgr0)\]"
PS1=""
if [[ $retval -ne 0 ]]; then
local red="\[$(tput setaf 1)\]"
PS1+="$red$retval$reset "
fi
PS1+="$green\u$reset "
PS1+="$blue\W$reset $ "
}
export PROMPT_COMMAND=_prompt_command
# Load .local file at the end for post configurations
if [ -e "$HOME/.bashrc.local" ]; then
source "$HOME/.bashrc.local"
fi

+ 1
- 1
common/aliases.sh View File

@ -17,4 +17,4 @@ alias path='echo -e ${PATH//:/\\n}'
function dotf { (cd $DOTFILES && "$@"); }
function touch { mkdir $(dirname "$1") && command touch "$1" }
function touch { mkdir $(dirname "$1") && command touch "$1"; }

+ 0
- 1
macos/.config/yabai/yabairc View File

@ -11,7 +11,6 @@ yabai -m config window_placement second_child
yabai -m config window_topmost off
yabai -m config window_shadow off
yabai -m config window_opacity on
yabai -m config window_opacity_duration 0.0
yabai -m config active_window_opacity 1.0
yabai -m config normal_window_opacity 0.75
yabai -m config window_border on

+ 1
- 1
macos/cleanup.sh View File

@ -1,6 +1,6 @@
#!/usr/bin/env false
if [[ "$OS" == macos ]] && type /usr/local/bin/brew &>/dev/null; then
if [[ "$OS" == macos ]] && type brew &>/dev/null; then
# Restore
unset -f /usr/libexec/path_helper
fi

+ 1
- 1
macos/env.sh View File

@ -11,5 +11,5 @@ if [[ "$OS" == macos ]] && type /usr/local/bin/brew &>/dev/null; then
export HOMEBREW_CASK_OPTS="--appdir=~/Applications"
# MacOS calls this in zprofile, temporarily hijack it
function /usr/libexec/path_helper {}
function /usr/libexec/path_helper() { :; }
fi

+ 1
- 1
zsh/.zshenv View File

@ -5,7 +5,7 @@ cleanup_helpers
# Load env files
typeset -U config_files
config_files=($DOTFILES/**/*.sh)
config_files=($DOTFILES/*/*.sh)
for file in ${(M)config_files:#*/env.sh}; do
source "$file"
done

+ 1
- 1
zsh/.zshrc View File

@ -40,7 +40,7 @@ if (( $+commands[antibody] )); then
fi
fi
# Load additional zsh files
# Load additional sh files
typeset -U config_files
config_files=($DOTFILES/*/*.sh)
for file in ${config_files:#*/env.sh}; do

Loading…
Cancel
Save