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.

131 lines
3.9 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
  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. export RUNZSH=no
  44. sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  45. git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting"
  46. # dotfiles
  47. if ! test -d "$DIR/dots"; then
  48. echo "$DIR/dots folder not found.";
  49. exit 1;
  50. fi
  51. cp "$DIR/dots/zshrc" "$HOME/.zshrc"
  52. cp "$DIR/dots/tmux.conf" "$HOME/.tmux.conf"
  53. git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm || exit 1
  54. tmux start \; \
  55. new -d \; \
  56. run "$HOME/.tmux/plugins/tpm/scripts/install_plugins.sh" \; \
  57. kill-session || exit 1
  58. mkdir -p "$HOME/.local/bin" || exit 1
  59. cp -r "$DIR/scripts/." "$HOME/.local/bin/" || exit 1
  60. }
  61. neovim() {
  62. # install neovim
  63. sudo dnf install -y neovim
  64. sudo npm install -g tree-sitter-cli
  65. git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim || exit 1
  66. git clone https://git.junickim.me/junikimm717/nvim2023 ~/.config/nvim || exit 1
  67. nvim -c PackerSync -c 'sleep 10' -c qa --headless
  68. echo "sleeping to compile"
  69. nvim -c 'sleep 40' -c qa --headless
  70. }
  71. neovim_fonts() {
  72. sudo dnf install -y fonts-jetbrains-mono
  73. mkdir -p "$HOME/.local/share/fonts/JB"
  74. cd "$HOME/.local/share/fonts/JB" || exit 1
  75. curl -LJO https://github.com/ryanoasis/nerd-fonts/releases/download/v2.3.3/JetBrainsMono.zip || exit 1
  76. unzip JetBrainsMono.zip || exit 1
  77. fc-cache -rv || exit 1
  78. sudo dnf install alacritty -y || exit 1
  79. mkdir -p "$HOME/.config/alacritty" || exit 1
  80. cp "$DIR/dots/alacritty.yml" "$HOME/.config/alacritty/alacritty.yml" || exit 1
  81. }
  82. competitiveprogramming() {
  83. echo "CP Compilers..."
  84. sudo dnf install -y clang clang-tools-extra
  85. cd "$HOME" || exit 1;
  86. git clone https://git.junickim.me/junikimm717/linuxcp "$HOME/cp"
  87. }
  88. case "$1" in
  89. ssh|s)
  90. (dependencies && sysinfo && dotfiles && neovim) || exit 1
  91. ;;
  92. graphical|g)
  93. (dependencies && sysinfo && browsers && dotfiles && neovim && neovim_fonts && popshell) || exit 1
  94. ;;
  95. full|f)
  96. (dependencies && sysinfo && browsers && torbrowser && meetings && dotfiles && neovim && neovim_fonts && popshell) || exit 1
  97. ;;
  98. cp|c)
  99. (dependencies && sysinfo && browsers && dotfiles && neovim && neovim_fonts && competitiveprogramming && popshell) || exit 1
  100. ;;
  101. *)
  102. echo "First Argument should be one of ssh, graphical, full, or cp"
  103. ;;
  104. esac
  105. cat <<EOF
  106. Stuff to do:
  107. - Install pop-shell (make local-install)
  108. - Settle brave key stuff
  109. - Copy over the mt config files
  110. EOF