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.

138 lines
3.6 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
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. bootstrap_paru () {
  6. mkdir -p "$HOME/repos"
  7. cd "$HOME/repos" || exit 1
  8. git clone https://aur.archlinux.org/paru-bin.git
  9. cd paru-bin || exit 1
  10. makepkg --noconfirm -si || exit 2
  11. cd "$HOME" || exit 1
  12. }
  13. paru_exists() {
  14. if ! command -V paru; then
  15. echo "Paru doesn't exist. Installing it"
  16. bootstrap_paru
  17. fi
  18. }
  19. usertest() {
  20. if test "$(id -u)" -eq 0; then
  21. echo "You cannot run this script as root.";
  22. exit 1;
  23. fi
  24. if ! (type sudo 2>&1) > /dev/null; then
  25. echo "sudo is not installed.";
  26. exit 1
  27. fi
  28. sudo -S pacman -Syu
  29. sudo -S pacman --noconfirm -S base-devel
  30. }
  31. dev() {
  32. echo "Developer tools..."
  33. sudo -S pacman --noconfirm -S neovim nodejs rustc
  34. }
  35. sysinfo() {
  36. echo "Dylan Araps scripts"
  37. cd "$HOME" || exit 1;
  38. mkdir -p repos
  39. git clone https://github.com/dylanaraps/pfetch "$HOME/repos/pfetch"
  40. git clone https://github.com/dylanaraps/neofetch "$HOME/repos/neofetch"
  41. git clone https://github.com/dylanaraps/fff "$HOME/repos/fff"
  42. cd "$HOME/repos/pfetch" || exit 1;
  43. sudo -S make install || exit 2;
  44. cd "$HOME" || exit 1;
  45. cd "$HOME/repos/neofetch" || exit 1;
  46. sudo -S make install || exit 2;
  47. cd "$HOME" || exit 1;
  48. cd "$HOME/repos/fff" || exit 1;
  49. sudo -S make install || exit 2;
  50. cd "$HOME" || exit 1;
  51. }
  52. shell() {
  53. sudo -S pacman --noconfirm -S zsh tmux starship
  54. }
  55. browsers() {
  56. paru --noconfirm -S brave-bin
  57. }
  58. torbrowser() {
  59. sudo -S pacman --noconfirm -S torbrowser-launcher
  60. }
  61. meetings() {
  62. paru_exists
  63. paru --noconfirm -S skypeforlinux-stable-bin zoom
  64. # install mt
  65. sudo -S curl -LJ https://github.com/junikimm717/mt/releases/download/33627ab/mt -o /usr/local/bin/mt
  66. sudo -S chmod +x /usr/local/bin/mt
  67. }
  68. # neovim must be installed.
  69. plugins() {
  70. # install vim-plug, oh-my-zsh, and zsh-syntax-highlighting
  71. sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
  72. https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
  73. sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  74. git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting"
  75. }
  76. dotfiles() {
  77. echo "Adding vim and zsh configs"
  78. if ! test -d "$DIR/dotfiles"; then
  79. echo "$DIR/dotfiles folder not found.";
  80. exit 1;
  81. fi
  82. mkdir -p "$HOME/.config/nvim"
  83. cp "$DIR/dotfiles/.zshrc" "$HOME/.zshrc"
  84. cp "$DIR/dotfiles/init.vim" "$HOME/.config/nvim/init.vim"
  85. nvim --headless +PlugInstall +qa
  86. cp "$DIR"/dotfiles/.cwmrc "$DIR/dotfiles/cwm.sh" "$DIR/dotfiles/.xinitrc" "$HOME"
  87. mkdir -p "$HOME/.config/kitty"
  88. cp "$DIR"/dotfiles/kitty.conf "$HOME/.config/kitty/"
  89. cp -r "$DIR"/dotfiles/polybar "$HOME/.config/"
  90. cp "$DIR"/dotfiles/tmux.conf "$HOME/.tmux.conf"
  91. mkdir -p "$HOME/.config/picom"
  92. cp "$DIR"/dotfiles/picom.conf "$HOME/.config/picom/"
  93. }
  94. graphical() {
  95. sudo -S pacman --noconfirm -S xorg xorg xorg-server xorg-xinit xorg-fonts-misc \
  96. xclip nitrogen dmenu ttf-jetbrains-mono noto-fonts-emoji ttf-dejavu \
  97. picom xclip kitty polybar
  98. paru -S --noconfirm cwm
  99. mkdir -p "$HOME/wallpaper"
  100. }
  101. sound() {
  102. sudo -S pacman --noconfirm -S pipewire-pulse
  103. systemctl --user --now enable pipewire-pulse
  104. }
  105. (usertest && bootstrap_paru && dev && sysinfo && shell && plugins && dotfiles && graphical && sound && browsers && meetings) || exit 1
  106. cat <<EOF
  107. Stuff to do:
  108. - Install pop-shell (make local-install)
  109. - Install the coc extensions
  110. - Settle brave key stuff
  111. - Copy over the mt config files
  112. - Wallpapers from wallhaven.cc
  113. EOF