bashrc-all 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. if [ -f ~/.wal_alias ]; then
  2. . ~/.wal_alias
  3. fi
  4. [ -f ~/.fzf.bash ] && source ~/.fzf.bash
  5. # Cargo config
  6. [ -f ~/.cargo ] && source "$HOME/.cargo/env"
  7. if [ -f ~/.cache/wal/sequences ]; then
  8. cat ~/.cache/wal/sequences
  9. fi
  10. export EDITOR=$(which vim)
  11. EXA_PATH=$(which exa)
  12. if [ ! -z "$EXA_PATH" ]; then
  13. alias ls="$EXA_PATH"
  14. alias ll="$EXA_PATH -lah"
  15. alias lg="$EXA_PATH -lah --git"
  16. fi
  17. # Platform agnostic aliases
  18. export TMUX_PATH=$(which tmux --skip-alias)
  19. alias tmuxn="$TMUX_PATH new -s $1"
  20. alias tmuxa="$TMUX_PATH attach -t $1"
  21. alias tmuxl="$TMUX_PATH ls"
  22. alias tmuxq="echo $TMUX"
  23. alias httpserver="python -m SimpleHTTPServer"
  24. if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
  25. then
  26. PATH="$HOME/.local/bin:$HOME/bin:$PATH"
  27. fi
  28. export PATH
  29. # Case defines platform specific configs
  30. # Platform agnostic configs above
  31. case $(hostname) in
  32. Simons-MBP)
  33. export PS1="\w λ > \[$(tput sgr0)\]"
  34. # Mac aliases
  35. alias shorten-ps1="PS1='λ > '"
  36. alias default-ps1='PS1="\w λ > \[$(tput sgr0)\]"'
  37. alias emacs="/Applications/Emacs.app/Contents/MacOS/Emacs"
  38. # PATH setups
  39. 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'
  40. default-ps1
  41. clear
  42. echo "Loaded MacM1 config"
  43. ;;
  44. watsonsi-fedora)
  45. export PS1="[\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]]\$ "
  46. alias start_od="rclone --vfs-cache-mode writes mount ipconedrive: /home/watonsi/OneDrive/"
  47. alias tmuxn="systemd-run --scope --user tmux new -s $1"
  48. # function to set terminal title
  49. function set-title() {
  50. if [[ -z "$ORIG" ]]; then
  51. ORIG=$PS1
  52. fi
  53. TITLE="\[\e]2;$*\a\]"
  54. PS1=${ORIG}${TITLE}
  55. }
  56. echo "Loaded Work Fedora config"
  57. ;;
  58. void)
  59. export PS1="\[\033[36m\]\w\[\033[m\] λ "
  60. alias shorten-ps1="PS1='λ > '"
  61. echo "Loaded Void config"
  62. esac