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.

96 lines
2.6 KiB

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