123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- if [ -f ~/.wal_alias ]; then
- . ~/.wal_alias
- fi
- [ -f ~/.fzf.bash ] && source ~/.fzf.bash
- # Cargo config
- [ -f ~/.cargo ] && source "$HOME/.cargo/env"
- CAT_PATH=$(which cat --skip-alias)
- if [ -f ~/.cache/wal/sequences ]; then
- $CAT_PATH ~/.cache/wal/sequences
- fi
- export EDITOR=$(which vim)
- EXA_PATH=$(which exa)
- if [ ! -z "$EXA_PATH" ]; then
- alias ls="$EXA_PATH"
- alias ll="$EXA_PATH -lah"
- alias lg="$EXA_PATH -lah --git"
- fi
- BAT_PATH=$(which bat)
- if [ ! -z "$BAT_PATH" ]; then
- export MANPAGER="$BAT_PATH"
- alias cat="$BAT_PATH"
- fi
- # Platform agnostic aliases
- export TMUX_PATH=$(which tmux --skip-alias)
- alias tmuxn="$TMUX_PATH new -s $1"
- alias tmuxa="$TMUX_PATH attach -t $1"
- alias tmuxl="$TMUX_PATH ls"
- alias tmuxq="echo $TMUX"
- alias httpserver="python -m SimpleHTTPServer"
- if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
- then
- PATH="$HOME/.local/bin:$HOME/bin:$PATH"
- fi
- export PATH
- # HN Helper functions
- # Pull up comments for number
- export HN_PATH=$(which hn)
- hnc() {
- if [ ! -z "$HN_PATH" ]; then
- hn view -c $1 | $BAT_PATH
- else
- echo "hn not in path"
- fi
- }
- # open submission in browser
- # Case defines platform specific configs
- # Platform agnostic configs above
- case $(hostname) in
- Simons-MacBook-Pro.local)
- export PS1="\w λ > \[$(tput sgr0)\]"
- # Mac aliases
- alias shorten-ps1="PS1='λ > '"
- alias default-ps1='PS1="\w λ > \[$(tput sgr0)\]"'
- alias emacs="/Applications/Emacs.app/Contents/MacOS/Emacs"
- # PATH setups
- PATH='/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/swatson/.fzf/bin:/Users/swatson/Library/Python/3.8/bin'
- default-ps1
- clear
- echo "Loaded MacM1 config"
- ;;
- swatson-casana)
- export PS1="\[\033[36m\]\w\[\033[m\] λ "
- # function to set terminal title
- function set-title() {
- if [[ -z "$ORIG" ]]; then
- ORIG=$PS1
- fi
- TITLE="\[\e]2;$*\a\]"
- PS1=${ORIG}${TITLE}
- }
- alias ssh-old="ssh -oKexAlgorithms=+diffie-hellman-group1-sha1"
-
- echo "Loaded Void Work Config"
- ;;
- void)
- export PS1="\[\033[36m\]\w\[\033[m\] λ "
- alias shorten-ps1="PS1='λ > '"
- echo "Loaded Void config"
-
- esac
|