bashrc-all 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. alias scrot="maim"
  49. # function to set terminal title
  50. function set-title() {
  51. if [[ -z "$ORIG" ]]; then
  52. ORIG=$PS1
  53. fi
  54. TITLE="\[\e]2;$*\a\]"
  55. PS1=${ORIG}${TITLE}
  56. }
  57. echo "Loaded Work Fedora config"
  58. ;;
  59. void)
  60. export PS1="\[\033[36m\]\w\[\033[m\] λ "
  61. alias shorten-ps1="PS1='λ > '"
  62. echo "Loaded Void config"
  63. esac