bashrc-all 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. # Case defines platform specific configs
  25. # Platform agnostic configs above
  26. case $(hostname) in
  27. Simons-MBP)
  28. export PS1="\w λ > \[$(tput sgr0)\]"
  29. # Mac aliases
  30. alias shorten-ps1="PS1='λ > '"
  31. alias default-ps1='PS1="\w λ > \[$(tput sgr0)\]"'
  32. alias emacs="/Applications/Emacs.app/Contents/MacOS/Emacs"
  33. # PATH setups
  34. 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'
  35. default-ps1
  36. clear
  37. echo "Loaded MacM1 config"
  38. ;;
  39. watsonsi-fedora)
  40. if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
  41. then
  42. PATH="$HOME/.local/bin:$HOME/bin:$PATH"
  43. fi
  44. export PATH
  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. esac