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.

149 lines
4.5 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
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 npm\
  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 skype
  51. curl https://go.skype.com/skypeforlinux-64.deb -LJo "$HOME/repos/skypeforlinux.deb"
  52. sudo apt install "$HOME/repos/skypeforlinux.deb" -y
  53. # install zoom
  54. curl https://zoom.us/client/latest/zoom_amd64.deb -LJo "$HOME/repos/zoomus.deb"
  55. sudo apt install "$HOME/repos/zoomus.deb" -y
  56. }
  57. dotfiles() {
  58. echo "Adding zsh and tmux configs"
  59. # zsh plugins
  60. export RUNZSH=no
  61. sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  62. git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting"
  63. # dotfiles
  64. if ! test -d "$DIR/dots"; then
  65. echo "$DIR/dots folder not found.";
  66. exit 1;
  67. fi
  68. cp "$DIR/dots/zshrc" "$HOME/.zshrc"
  69. cp "$DIR/dots/tmux.conf" "$HOME/.tmux.conf"
  70. git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm || exit 1
  71. tmux start \; \
  72. new -d \; \
  73. run "$HOME/.tmux/plugins/tpm/scripts/install_plugins.sh" \; \
  74. kill-session || exit 1
  75. mkdir -p "$HOME/.local/bin" || exit 1
  76. cp -r "$DIR/scripts/." "$HOME/.local/bin/" || exit 1
  77. go install github.com/junikimm717/tmuxs || exit 1
  78. }
  79. neovim() {
  80. # install neovim
  81. (
  82. sudo curl https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage -LJo /usr/bin/nvim && sudo chmod +x /usr/bin/nvim
  83. ) || exit 1
  84. git clone https://github.com/junikimm717/nvim2025 ~/.config/nvim || exit 1
  85. nvim --headless +Lazy! sync +FullSetup +qa
  86. }
  87. neovim_fonts() {
  88. mkdir -p "$HOME/.local/share/fonts/UM"
  89. cd "$HOME/.local/share/fonts/UM" || exit 1
  90. curl -LJO https://github.com/ryanoasis/nerd-fonts/releases/download/v2.3.3/UbuntuMono.zip || exit 1
  91. unzip UbuntuMono.zip || exit 1
  92. fc-cache -rv || exit 1
  93. sudo add-apt-repository ppa:aslatter/ppa -y
  94. sudo apt install alacritty -y || exit 1
  95. mkdir -p "$HOME/.config/alacritty" || exit 1
  96. cp "$DIR/dots/alacritty_ubuntu.toml" "$HOME/.config/alacritty/alacritty.toml" || exit 1
  97. cp "$DIR/dots/catppuccin-mocha.toml" "$HOME/.config/alacritty/catppuccin-mocha.toml" || exit 1
  98. }
  99. competitiveprogramming() {
  100. echo "CP Compilers..."
  101. sudo apt install clang clang-tools-extra
  102. cd "$HOME" || exit 1;
  103. git clone https://git.junickim.me/junikimm717/linuxcp "$HOME/cp"
  104. }
  105. case "$1" in
  106. ssh|s)
  107. (dependencies && sysinfo && dotfiles && neovim) || exit 1
  108. ;;
  109. graphical|g)
  110. (dependencies && sysinfo && dotfiles && neovim && neovim_fonts && popshell) || exit 1
  111. ;;
  112. full|f)
  113. (dependencies && sysinfo && torbrowser && meetings && dotfiles && neovim && neovim_fonts && popshell) || exit 1
  114. ;;
  115. cp|c)
  116. (dependencies && sysinfo && dotfiles && neovim && neovim_fonts && competitiveprogramming && popshell) || exit 1
  117. ;;
  118. *)
  119. echo "First Argument should be one of ssh, graphical, full, or cp"
  120. ;;
  121. esac
  122. cat <<EOF
  123. Stuff to do:
  124. - Reboot to make all changes active
  125. - Copy over the mt config files
  126. EOF