# Make sure XDG_CONFIG_HOME is a thing if [[ -z $XDG_CONFIG_HOME ]]; then export XDG_CONFIG_HOME="$HOME/.config" fi mkdir -p "$XDG_CONFIG_HOME" # Path export PATH="/usr/local/bin:/usr/local/sbin:$PATH" export PATH="/usr/local/share/npm/bin:$PATH" export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" export PATH="/usr/local/opt/python/libexec/bin:$PATH" # Homebrew Python (typically 3) export PATH="$HOME/.local/bin:$PATH" # Stack (Haskell) puts stuff here export PATH="$HOME/.cabal/bin:$PATH" # Cabal (Haskell) puts stuff here ruby_prefix=$(brew --prefix ruby)/bin export PATH=$ruby_prefix/bin:$PATH # rubygems tty=$(tty) export GPG_TTY=$tty export EDITOR=kak #export TERM=xterm-256color export CLICOLOR=1 export LSCOLORS=dxfxcxdxbxegedabagacad alias ls='ls -h' # Keep TAR from tarring-up resource forks export COPYFILE_DISABLE=true # Bash completion bash_completion=/usr/local/etc/profile.d/bash_completion.sh # shellcheck disable=1090 [[ -r $bash_completion ]] && . $bash_completion # Prompt meow_prompt="$XDG_CONFIG_HOME/meowgorithm/prompt" # shellcheck disable=1090 [[ -f $meow_prompt ]] && . "$XDG_CONFIG_HOME/meowgorithm/prompt" # Go Stuff export GOPATH=$HOME/.go mkdir -p "$GOPATH/{src,bin}" export GOBIN=$GOPATH/bin env_gopath=$(go env GOPATH) export PATH=$PATH:/usr/local/opt/go/libexec/bin:$GOBIN:$env_gopath # History Management shopt -s histappend export HISTCONTROL=ignoredups:erasedups export HISTSIZE=1000 # Miscellaneous aliases alias flushdns='sudo dscacheutil -flushcache && dscacheutil -flushcache' alias tree='tree -C' alias lock_pip='export PIP_REQUIRE_VIRTUALENV=true' alias unlock_pip='export PIP_REQUIRE_VIRTUALENV=false' alias delete_pyc='find . -name '\*.pyc' -delete' alias delete_orig='find . -name '\*.orig' -delete' alias install_kitty='curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin' alias fix_spotlight="find . -type d -path './.*' -prune -o -path './Pictures*' -prune -o -path './Library*' -prune -o -path '*node_modules/*' -prune -o -type d -name 'node_modules' -exec touch '{}/.metadata_never_index' \; -print" # Helper vars export PEKKA='git+ssh://pekka.land/var/git' export MEOW='git@github.com:meowgorithm' export MAGIC='git@github.com:magicnumbers' export BIT='https://meowgorithm@bitbucket.org/meowgorithm' export GITLAB='git@gitlab.com:meowgorithm' export CHARM='git@github.com:charmbracelet' # Git export GOPRIVATE="github.com/magicnumbers" export GOPRIVATE="github.com/charmbracelet" # Print local network adapter IPs and copy them to the clipboard alias en0="ipconfig getifaddr en0 | pbcopy && ipconfig getifaddr en0" alias en1="ipconfig getifaddr en1 | pbcopy && ipconfig getifaddr en1" # Z # shellcheck source=/usr/local/etc/profile.d/z.sh [[ -f $(brew --prefix)/etc/profile.d/z.sh ]] && . "$(brew --prefix)/etc/profile.d/z.sh" # PIP + Virtualenv Stuff lazy_virtualenvwrapper_script=/usr/local/bin/virtualenvwrapper_lazy.sh if [ -f $lazy_virtualenvwrapper_script ]; then export PIP_REQUIRE_VIRTUALENV=true export PIP_RESPECT_VIRTUALENV=true export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python export PIP_LOG_FILE="$HOME/.cache/pip-log.txt" # Don't litter pip_log.txt in cwd please export WORKON_HOME=~/.virtualenvs # shellcheck disable=1090 source $lazy_virtualenvwrapper_script fi # Colored man pages export LESS_TERMCAP_mb=$'\E[01;31m' export LESS_TERMCAP_md=$'\E[01;31m' export LESS_TERMCAP_me=$'\E[0m' export LESS_TERMCAP_se=$'\E[0m' export LESS_TERMCAP_so=$'\E[01;44;33m' export LESS_TERMCAP_ue=$'\E[0m' export LESS_TERMCAP_us=$'\E[01;32m' # direnv. See: https://direnv.net if hash direnv 2>/dev/null; then eval "$(direnv hook bash)" fi # FZF export FZF_DEFAULT_OPTS='--height=10' # NPM. Make "global" installs local NPM_DIR="$XDG_CONFIG_HOME/npm" mkdir -p "$NPM_DIR" npm config set prefix "$NPM_DIR" export PATH=$NPM_DIR/bin:$PATH # GHCUP [ -f "$HOME/.ghcup/env" ] && . "$HOME/.ghcup/env"