You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

144 lines
4.2 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. #!/bin/sh
  2. DIR="$(realpath "$(dirname "$0")")"
  3. # script must start at home directory
  4. cd "$HOME" || exit 1;
  5. dependencies() {
  6. if ! (type sudo 2>&1) > /dev/null; then
  7. echo "sudo is not installed.";
  8. exit 1
  9. fi
  10. sudo apt-get update -y
  11. sudo apt-get install -y make curl sudo git zip unzip || exit 1
  12. echo "Updating APT and adding PPA's"
  13. curl -sL https://deb.nodesource.com/setup_22.x | sudo -E bash -
  14. sudo apt-get update -y || exit 1
  15. sudo apt-get install -y ripgrep nodejs gcc g++ golang fzf\
  16. wget tar default-jdk tree-sitter-cli python3-venv cargo tmux zsh libfuse2 || exit 1
  17. }
  18. sysinfo() {
  19. echo "Dylan Araps scripts"
  20. cd "$HOME" || exit 1;
  21. mkdir -p repos
  22. git clone https://github.com/dylanaraps/pfetch "$HOME/repos/pfetch"
  23. git clone https://github.com/dylanaraps/neofetch "$HOME/repos/neofetch"
  24. git clone https://github.com/dylanaraps/fff "$HOME/repos/fff"
  25. cd "$HOME/repos/pfetch" || exit 1;
  26. sudo make install || exit 2;
  27. cd "$HOME" || exit 1;
  28. cd "$HOME/repos/neofetch" || exit 1;
  29. sudo make install || exit 2;
  30. cd "$HOME" || exit 1;
  31. cd "$HOME/repos/fff" || exit 1;
  32. sudo make install || exit 2;
  33. cd "$HOME" || exit 1;
  34. }
  35. torbrowser() {
  36. sudo apt install -y torbrowser-launcher
  37. }
  38. popshell() {
  39. mkdir -p "$HOME/repos"
  40. sudo apt install git node-typescript make -y
  41. git clone https://github.com/pop-os/shell.git "$HOME/repos/shell"
  42. cd "$HOME/repos/shell" || exit 1
  43. make depcheck
  44. make compile
  45. make install
  46. make configure
  47. }
  48. meetings() {
  49. mkdir -p "$HOME/repos"
  50. # install zoom
  51. curl https://zoom.us/client/latest/zoom_amd64.deb -LJo "$HOME/repos/zoomus.deb"
  52. sudo apt install "$HOME/repos/zoomus.deb" -y
  53. }
  54. dotfiles() {
  55. echo "Adding zsh and tmux configs"
  56. # zsh plugins
  57. export RUNZSH=no
  58. sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  59. git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting"
  60. # dotfiles
  61. if ! test -d "$DIR/dots"; then
  62. echo "$DIR/dots folder not found.";
  63. exit 1;
  64. fi
  65. cp "$DIR/dots/zshrc" "$HOME/.zshrc"
  66. cp "$DIR/dots/tmux.conf" "$HOME/.tmux.conf"
  67. git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm || exit 1
  68. tmux start \; \
  69. new -d \; \
  70. run "$HOME/.tmux/plugins/tpm/scripts/install_plugins.sh" \; \
  71. kill-session || exit 1
  72. mkdir -p "$HOME/.local/bin" || exit 1
  73. go install github.com/junikimm717/tmuxs@latest || exit 1
  74. }
  75. neovim() {
  76. # install neovim
  77. (
  78. sudo curl https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage -LJo /usr/bin/nvim && sudo chmod +x /usr/bin/nvim
  79. ) || exit 1
  80. git clone https://github.com/junikimm717/nvim2025 ~/.config/nvim || exit 1
  81. nvim --headless +Lazy! sync +FullSetup +qa
  82. }
  83. neovim_fonts() {
  84. mkdir -p "$HOME/.local/share/fonts/UM"
  85. cd "$HOME/.local/share/fonts/UM" || exit 1
  86. curl -LJO https://github.com/ryanoasis/nerd-fonts/releases/download/v2.3.3/UbuntuMono.zip || exit 1
  87. unzip UbuntuMono.zip || exit 1
  88. fc-cache -rv || exit 1
  89. sudo add-apt-repository ppa:aslatter/ppa -y
  90. sudo apt install alacritty -y || exit 1
  91. mkdir -p "$HOME/.config/alacritty" || exit 1
  92. cp "$DIR/dots/alacritty_ubuntu.toml" "$HOME/.config/alacritty/alacritty.toml" || exit 1
  93. cp "$DIR/dots/catppuccin-mocha.toml" "$HOME/.config/alacritty/catppuccin-mocha.toml" || exit 1
  94. }
  95. competitiveprogramming() {
  96. echo "CP Compilers..."
  97. sudo apt install clang clang-tools-extra
  98. cd "$HOME" || exit 1;
  99. git clone https://git.junickim.me/junikimm717/linuxcp "$HOME/cp"
  100. }
  101. case "$1" in
  102. ssh|s)
  103. (dependencies && sysinfo && dotfiles && neovim) || exit 1
  104. ;;
  105. graphical|g)
  106. (dependencies && sysinfo && dotfiles && neovim && neovim_fonts && popshell) || exit 1
  107. ;;
  108. full|f)
  109. (dependencies && sysinfo && torbrowser && meetings && dotfiles && neovim && neovim_fonts && popshell) || exit 1
  110. ;;
  111. cp|c)
  112. (dependencies && sysinfo && dotfiles && neovim && neovim_fonts && competitiveprogramming && popshell) || exit 1
  113. ;;
  114. *)
  115. echo "First Argument should be one of ssh, graphical, full, or cp"
  116. ;;
  117. esac
  118. cat <<EOF
  119. Stuff to do:
  120. - Reboot to make all changes active
  121. - Copy over the mt config files
  122. EOF