| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- ################################################################################
- # $PATH and similar
- ################################################################################
- export GOPATH="$HOME/.go"
- # Add to path without duplicates
- function add_to_path {
- if [[ ! ":$PATH:" == *":$1:"* ]]; then
- if [ "$2" = true ] ; then
- PATH=":$1:$PATH:"
- else
- PATH="$PATH:$1:"
- fi
- PATH=${PATH/::/:/.}
- if [[ "$PATH" == ":"* ]]; then
- PATH="${PATH:1}"
- fi
- if [[ "$PATH" == *":" ]]; then
- PATH="${PATH::-1}"
- fi
- fi
- }
- add_to_path "/usr/local/bin/" true
- add_to_path "/opt/homebrew/sbin" true
- add_to_path "/opt/homebrew/bin" true
- # Additional Homebrew items that aren't linked by default
- add_to_path "/opt/homebrew/opt/ruby/bin"
- add_to_path "/opt/homebrew/opt/libpq/bin"
- add_to_path "${HOME}/.scripts"
- add_to_path "${GOPATH}/bin"
- add_to_path "${HOME}/.gem/bin"
- add_to_path "${HOME}/.cargo/bin"
- add_to_path "${HOME}/.poetry/bin"
- add_to_path "${HOME}/.rvm/bin"
- export PATH
- ################################################################################
- # Miscellaneous configuration options
- ################################################################################
- export HOMEBREW_NO_ANALYTICS=1
- ################################################################################
- # Color palette and dark mode
- ################################################################################
- source $XDG_CONFIG_HOME/jonathandarker/palette.sh
- export LIGHTMODE_TOGGLE_FLAG_FILE="$XDG_RUNTIME_DIR/lightmode.toggled.flag"
- if [ -f $LIGHTMODE_TOGGLE_FLAG_FILE ]; then
- export JONATHANDARKER_COLOR_BG="$JONATHANDARKER_COLOR_15"
- export JONATHANDARKER_COLOR_BA="$JONATHANDARKER_COLOR_07"
- export JONATHANDARKER_COLOR_FG="$JONATHANDARKER_COLOR_00"
- export JONATHANDARKER_COLOR_FA="$JONATHANDARKER_COLOR_08"
- fi
- ################################################################################
- # Ports
- ################################################################################
- export SURFINGKEYS_SETTINGS_SERVER_PORT="21212"
- ################################################################################
- # Aliases
- ################################################################################
- alias n="nvim"
- alias lg="lazygit"
- alias ld="lazydocker"
- # git
- alias g="git"
- alias gs="git s"
- alias gl="git l"
- # ls
- alias ls="lsd -a"
- alias la="lsd -la"
- # clear
- alias c="clear && NEW_LINE_BEFORE_PROMPT=0"
- alias clear="clear && NEW_LINE_BEFORE_PROMPT=0"
- #python
- alias python="python3.13"
- alias py="python3.13"
- #granted
- alias assume=". assume"
- #brew
- alias brewdump="(cd $XDG_CONFIG_HOME/brew/ && brew bundle dump --force --describe)"
- ################################################################################
- # nvm
- # Lazy-loaded, using logic from https://github.com/undg/zsh-nvm-lazy-load
- ################################################################################
- export NVM_DIR="$HOME/.nvm"
- load-nvm() {
- [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
- [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
- }
- nvm() { unset -f nvm; load-nvm; nvm "$@" }
- node() { unset -f node; load-nvm; node "$@"; }
- npm() { unset -f npm; load-nvm; npm "$@"; }
- pnpm() { unset -f pnpm; load-nvm; pnpm "$@"; }
- yarn() { unset -f yarn; load-nvm; yarn "$@"; }
- ################################################################################
- # Private or system-specific environment variables
- ################################################################################
- source $ZDOTDIR/.zshenv.private
|