bashrc-all 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 $(which wal> /dev/null 2>&1); 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. alias tmuxa="tmux attach -t $1"
  19. alias tmuxl="tmux ls"
  20. alias tmuxq="echo $TMUX"
  21. alias httpserver="python -m SimpleHTTPServer"
  22. # Case defines platform specific configs
  23. # Platform agnostic configs above
  24. case $(hostname) in
  25. Simons-MBP)
  26. export PS1="\w λ > \[$(tput sgr0)\]"
  27. # Mac aliases
  28. alias shorten-ps1="PS1='λ > '"
  29. alias default-ps1='PS1="\w λ > \[$(tput sgr0)\]"'
  30. alias tmuxn="tmux new -s $1"
  31. alias emacs="/Applications/Emacs.app/Contents/MacOS/Emacs"
  32. # PATH setups
  33. 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'
  34. default-ps1
  35. clear
  36. echo "Loaded MacM1 config"
  37. ;;
  38. watsonsi-fedora)
  39. alias start_od="rclone --vfs-cache-mode writes mount ipconedrive: /home/watonsi/OneDrive/"
  40. alias tmux="systemd-run --scope --user tmux"
  41. # function to set terminal title
  42. function set-title() {
  43. if [[ -z "$ORIG" ]]; then
  44. ORIG=$PS1
  45. fi
  46. TITLE="\[\e]2;$*\a\]"
  47. PS1=${ORIG}${TITLE}
  48. }
  49. echo "Loaded Work Fedora config"
  50. ;;
  51. esac