bashrc-all 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. BAT_PATH=$(which bat)
  18. if [ ! -z "$BAT_PATH" ]; then
  19. export MANPAGER="$BAT_PATH"
  20. fi
  21. # Platform agnostic aliases
  22. export TMUX_PATH=$(which tmux --skip-alias)
  23. alias tmuxn="$TMUX_PATH new -s $1"
  24. alias tmuxa="$TMUX_PATH attach -t $1"
  25. alias tmuxl="$TMUX_PATH ls"
  26. alias tmuxq="echo $TMUX"
  27. alias httpserver="python -m SimpleHTTPServer"
  28. if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
  29. then
  30. PATH="$HOME/.local/bin:$HOME/bin:$PATH"
  31. fi
  32. export PATH
  33. # Case defines platform specific configs
  34. # Platform agnostic configs above
  35. case $(hostname) in
  36. Simons-MBP)
  37. export PS1="\w λ > \[$(tput sgr0)\]"
  38. # Mac aliases
  39. alias shorten-ps1="PS1='λ > '"
  40. alias default-ps1='PS1="\w λ > \[$(tput sgr0)\]"'
  41. alias emacs="/Applications/Emacs.app/Contents/MacOS/Emacs"
  42. # PATH setups
  43. 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'
  44. default-ps1
  45. clear
  46. echo "Loaded MacM1 config"
  47. ;;
  48. watsonsi-fedora)
  49. export PS1="[\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]]\$ "
  50. alias start_od="rclone --vfs-cache-mode writes mount ipconedrive: /home/watonsi/OneDrive/"
  51. alias tmuxn="systemd-run --scope --user tmux new -s $1"
  52. alias scrot="maim"
  53. # function to set terminal title
  54. function set-title() {
  55. if [[ -z "$ORIG" ]]; then
  56. ORIG=$PS1
  57. fi
  58. TITLE="\[\e]2;$*\a\]"
  59. PS1=${ORIG}${TITLE}
  60. }
  61. echo "Loaded Work Fedora config"
  62. ;;
  63. void)
  64. export PS1="\[\033[36m\]\w\[\033[m\] λ "
  65. alias shorten-ps1="PS1='λ > '"
  66. echo "Loaded Void config"
  67. esac