bashrc-all 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
  40. then
  41. PATH="$HOME/.local/bin:$HOME/bin:$PATH"
  42. fi
  43. export PATH
  44. export PS1="[\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]]\$ "
  45. alias start_od="rclone --vfs-cache-mode writes mount ipconedrive: /home/watonsi/OneDrive/"
  46. alias tmux="systemd-run --scope --user tmux"
  47. # function to set terminal title
  48. function set-title() {
  49. if [[ -z "$ORIG" ]]; then
  50. ORIG=$PS1
  51. fi
  52. TITLE="\[\e]2;$*\a\]"
  53. PS1=${ORIG}${TITLE}
  54. }
  55. echo "Loaded Work Fedora config"
  56. ;;
  57. esac