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.

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