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.

127 lines
3.8 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
  1. #!/bin/sh
  2. DIR="$(realpath "$(dirname "$0")")"
  3. # script must start at home directory
  4. cd "$HOME" || exit 1;
  5. dependencies() {
  6. sudo dnf update -y
  7. sudo dnf install -y make curl sudo git zip unzip || exit 1
  8. sudo dnf install -y nodejs golang cargo tmux g++ gcc || exit 1
  9. }
  10. sysinfo() {
  11. echo "Dylan Araps scripts"
  12. cd "$HOME" || exit 1;
  13. mkdir -p repos
  14. git clone https://github.com/dylanaraps/pfetch "$HOME/repos/pfetch"
  15. git clone https://github.com/dylanaraps/neofetch "$HOME/repos/neofetch"
  16. git clone https://github.com/dylanaraps/fff "$HOME/repos/fff"
  17. cd "$HOME/repos/pfetch" || exit 1;
  18. sudo make install || exit 2;
  19. cd "$HOME" || exit 1;
  20. cd "$HOME/repos/neofetch" || exit 1;
  21. sudo make install || exit 2;
  22. cd "$HOME" || exit 1;
  23. cd "$HOME/repos/fff" || exit 1;
  24. sudo make install || exit 2;
  25. cd "$HOME" || exit 1;
  26. }
  27. browsers() {
  28. sudo dnf install -y dnf-plugins-core
  29. sudo dnf config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
  30. sudo rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
  31. sudo dnf install -y brave-browser
  32. }
  33. torbrowser() {
  34. sudo dnf install -y torbrowser-launcher
  35. }
  36. popshell() {
  37. sudo dnf install -y gnome-shell-extension-pop-shell
  38. }
  39. dotfiles() {
  40. echo "Adding zsh and tmux configs"
  41. # zsh plugins
  42. sudo dnf install -y zsh
  43. sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  44. git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting"
  45. # dotfiles
  46. if ! test -d "$DIR/dots"; then
  47. echo "$DIR/dots folder not found.";
  48. exit 1;
  49. fi
  50. cp "$DIR/dots/zshrc" "$HOME/.zshrc"
  51. cp "$DIR/dots/tmux.conf" "$HOME/.tmux.conf"
  52. git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm || exit 1
  53. tmux start \; \
  54. new -d \; \
  55. run "$HOME/.tmux/plugins/tpm/scripts/install_plugins.sh" \; \
  56. kill-session || exit 1
  57. mkdir -p "$HOME/.local/bin" || exit 1
  58. cp -r "$DIR/scripts/." "$HOME/.local/bin/" || exit 1
  59. }
  60. neovim() {
  61. # install neovim
  62. sudo dnf install -y neovim
  63. sudo npm install -g tree-sitter-cli
  64. git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim || exit 1
  65. git clone https://git.junickim.me/junikimm717/nvim2023 ~/.config/nvim || exit 1
  66. nvim -c PackerSync -c 'sleep 10' -c qa --headless
  67. echo "sleeping to compile"
  68. nvim -c 'sleep 40' -c qa --headless
  69. }
  70. neovim_fonts() {
  71. sudo apt install fonts-jetbrains-mono
  72. mkdir -p "$HOME/.local/share/fonts/JB"
  73. cd "$HOME/.local/share/fonts/JB" || exit 1
  74. curl -LJO https://github.com/ryanoasis/nerd-fonts/releases/download/v2.3.3/JetBrainsMono.zip || exit 1
  75. unzip JetBrainsMono.zip || exit 1
  76. fc-cache -rv || exit 1
  77. }
  78. competitiveprogramming() {
  79. echo "CP Compilers..."
  80. sudo dnf install -y clang clang-tools-extra
  81. cd "$HOME" || exit 1;
  82. git clone https://git.junickim.me/junikimm717/linuxcp "$HOME/cp"
  83. }
  84. case "$1" in
  85. ssh|s)
  86. (dependencies && sysinfo && dotfiles && neovim) || exit 1
  87. ;;
  88. graphical|g)
  89. (dependencies && sysinfo && browsers && dotfiles && neovim && neovim_fonts && popshell) || exit 1
  90. ;;
  91. full|f)
  92. (dependencies && sysinfo && browsers && torbrowser && meetings && dotfiles && neovim && neovim_fonts && popshell) || exit 1
  93. ;;
  94. cp|c)
  95. (dependencies && sysinfo && browsers && dotfiles && neovim && neovim_fonts && competitiveprogramming && popshell) || exit 1
  96. ;;
  97. *)
  98. echo "First Argument should be one of ssh, graphical, full, or cp"
  99. ;;
  100. esac
  101. cat <<EOF
  102. Stuff to do:
  103. - Install pop-shell (make local-install)
  104. - Settle brave key stuff
  105. - Copy over the mt config files
  106. EOF