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.

95 lines
2.6 KiB

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. }
  53. neovim() {
  54. # install neovim
  55. sudo dnf install -y neovim
  56. git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim || exit 1
  57. git clone https://git.junickim.me/junikimm717/nvim2023 ~/.config/nvim || exit 1
  58. nvim -c PackerSync -c 'sleep 10' -c qa --headless
  59. echo "sleeping to compile"
  60. nvim -c 'sleep 40' -c qa --headless
  61. }
  62. competitiveprogramming() {
  63. echo "CP Compilers..."
  64. sudo dnf install -y clang clang-tools-extra
  65. cd "$HOME" || exit 1;
  66. git clone https://git.junickim.me/junikimm717/linuxcp "$HOME/cp"
  67. }
  68. #(dependencies && sysinfo && browsers && torbrowser && meetings && dotfiles && neovim) || exit 1
  69. (dependencies && sysinfo && dotfiles && neovim) || exit 1
  70. cat <<EOF
  71. Stuff to do:
  72. - Install pop-shell (make local-install)
  73. - Settle brave key stuff
  74. - Copy over the mt config files
  75. EOF