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.

168 lines
5.4 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
  1. #!/bin/sh
  2. DIR="$(realpath "$(dirname "$0")")"
  3. if ! grep 'Pop!_OS' /etc/os-release > /dev/null 2>&1; then
  4. echo "This is not Pop!_OS, exiting..."
  5. exit
  6. fi
  7. # script must start at home directory
  8. cd "$HOME" || exit 1;
  9. dependencies() {
  10. sudo apt update -y
  11. sudo apt install -y make curl sudo git zip unzip || exit 1
  12. if ! (type sudo 2>&1) > /dev/null; then
  13. echo "sudo is not installed.";
  14. exit 1
  15. fi
  16. echo "Updating APT and adding PPA's"
  17. curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -
  18. sudo apt update -y || exit 1
  19. sudo apt install -y nodejs golang cargo tmux g++ gcc stow || exit 1
  20. }
  21. sysinfo() {
  22. echo "Dylan Araps scripts"
  23. cd "$HOME" || exit 1;
  24. mkdir -p repos
  25. git clone https://github.com/dylanaraps/pfetch "$HOME/repos/pfetch"
  26. git clone https://github.com/dylanaraps/neofetch "$HOME/repos/neofetch"
  27. git clone https://github.com/dylanaraps/fff "$HOME/repos/fff"
  28. cd "$HOME/repos/pfetch" || exit 1;
  29. sudo make install || exit 2;
  30. cd "$HOME" || exit 1;
  31. cd "$HOME/repos/neofetch" || exit 1;
  32. sudo make install || exit 2;
  33. cd "$HOME" || exit 1;
  34. cd "$HOME/repos/fff" || exit 1;
  35. sudo make install || exit 2;
  36. cd "$HOME" || exit 1;
  37. }
  38. browsers() {
  39. sudo apt remove -y firefox
  40. # install brave
  41. sudo apt install apt-transport-https -y || exit 1
  42. sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg || exit 1
  43. echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main"| sudo tee /etc/apt/sources.list.d/brave-browser-release.list
  44. sudo apt update -y
  45. sudo apt install brave-browser -y || exit 1
  46. }
  47. meetings() {
  48. mkdir -p "$HOME/repos"
  49. # install skype
  50. curl https://go.skype.com/skypeforlinux-64.deb -LJo "$HOME/repos/skypeforlinux.deb"
  51. sudo apt install "$HOME/repos/skypeforlinux.deb" -y
  52. # install zoom
  53. curl https://zoom.us/client/latest/zoom_amd64.deb -LJo "$HOME/repos/zoomus.deb"
  54. sudo apt install "$HOME/repos/zoomus.deb" -y
  55. # install mt
  56. sudo curl -LJ https://github.com/junikimm717/mt/releases/download/33627ab/mt -o /usr/local/bin/mt
  57. sudo chmod +x /usr/local/bin/mt
  58. }
  59. dotfiles() {
  60. echo "Adding zsh and tmux configs"
  61. # zsh plugins
  62. sudo apt install -y zsh tmux shellcheck fzf
  63. export RUNZSH=no
  64. sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  65. git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting"
  66. # stow dotfiles
  67. cd "$DIR" || exit 1
  68. rm -rf ~/.zshrc ~/.tmux.conf
  69. ./stow dots scripts || exit 1
  70. curl -LJ https://git.junickim.me/junikimm717/vim2023/raw/branch/master/lsp.vimrc -o "$HOME/.vimrc"
  71. # tpm
  72. test -e ~/.tmux/plugins/tpm || git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm || exit 1
  73. tmux start \; \
  74. new -d \; \
  75. run "$HOME/.tmux/plugins/tpm/scripts/install_plugins.sh" \; \
  76. kill-session || exit 1
  77. }
  78. nfs() {
  79. sudo apt install -y nfs-common cifs-utils
  80. mkdir -p ~/nfs/rpi ~/nfs/d2
  81. }
  82. neovim() {
  83. # install neovim
  84. curl https://github.com/neovim/neovim/releases/download/stable/nvim-linux64.deb -LJo "$HOME/repos/nvim-linux64.deb" || exit 1
  85. sudo apt install "$HOME/repos/nvim-linux64.deb" -y || exit 1
  86. sudo npm install -g tree-sitter-cli
  87. git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim || exit 1
  88. git clone https://git.junickim.me/junikimm717/nvim2023 ~/.config/nvim || exit 1
  89. nvim -c PackerSync -c 'sleep 10' -c qa --headless
  90. echo "sleeping to compile"
  91. nvim -c 'sleep 60' -c qa --headless
  92. }
  93. neovim_fonts() {
  94. sudo apt install -y fonts-jetbrains-mono
  95. mkdir -p "$HOME/.local/share/fonts/JB"
  96. cd "$HOME/.local/share/fonts/JB" || exit 1
  97. curl -LJO https://github.com/ryanoasis/nerd-fonts/releases/download/v2.3.3/JetBrainsMono.zip || exit 1
  98. unzip JetBrainsMono.zip || exit 1
  99. fc-cache -rv || exit 1
  100. sudo add-apt-repository ppa:aslatter/ppa -y
  101. sudo apt install alacritty -y || exit 1
  102. }
  103. wm() {
  104. sudo add-apt-repository -y ppa:papirus/papirus
  105. sudo apt update && sudo apt install -y i3 polybar nitrogen feh picom rofi stow papirus-icon-theme conky
  106. # installing siji
  107. mkdir -p "$HOME/repos/siji"
  108. cd "$HOME/repos/siji" || exit 1
  109. curl -LJO https://github.com/fauno/siji/archive/master.tar.gz || exit 1
  110. tar -xzvf ./siji-master.tar.gz || exit 1
  111. mkdir -p "$HOME/.local/share/fonts" || exit 1
  112. cp ./siji-master/ttf/siji.ttf "$HOME/.local/share/fonts/" || exit 1
  113. fc-cache -rv
  114. cd "$DIR" || exit 1
  115. ./stow wm rofi polybar alacritty
  116. }
  117. music() {
  118. sudo apt install -y mpd ncmpcpp
  119. cd "$DIR" || exit 1
  120. ./stow music
  121. mkdir -p ~/Music
  122. systemctl enable --user --now mpd.service
  123. }
  124. berry() {
  125. sudo apt-get install -y libx11-dev libxft-dev libxinerama-dev sxhkd || exit 1
  126. cd "$HOME/repos" || exit 1
  127. git clone https://github.com/JLErvin/berry
  128. cd berry || exit 1
  129. make && sudo make install || exit 1
  130. cat <<EOF | sudo tee /usr/share/xsessions/berry.desktop
  131. [Desktop Entry]
  132. Encoding=UTF-8
  133. Name=berry
  134. Comment=berry - a small window manager
  135. Exec=berry
  136. Type=XSession
  137. EOF
  138. }
  139. (dependencies && sysinfo && browsers && dotfiles && neovim && neovim_fonts && nfs && wm && music && berry) || exit 1
  140. echo "Reboot to make all changes active."