install.sh 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. #!/usr/bin/zsh
  2. echo -n "[*] Do you want to install all packages via pacman? [y/n] "
  3. read yesno
  4. if [[ "$yesno" == "y" ]]; then
  5. echo "[*] Installing most popular tools"
  6. # most important tools that are _always_ needed
  7. sudo pacman -Sy fzf fd neovim ripgrep nmap hexyl ctags git podman ueberzug duf exa i3blocks udiskie alacritty rofi firefox python-pip vifm zathura zathura-pdf-mupdf sxiv feh xclip flameshot manjaro-pipewire pavucontrol rofimoji noto-fonts noto-fonts-emoji noto-fonts-extra light redshift zip unzip kitty ttf-jetbrains-mono-nerd
  8. fi
  9. # .zpretzo
  10. echo -n "[*] Do you want to install zpretzo? [y/n] "
  11. read yesno
  12. if [[ "$yesno" == "y" ]]; then
  13. cd $HOME
  14. [ ! -d "$HOME/.zprezto" ] && git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
  15. setopt EXTENDED_GLOB
  16. for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
  17. rm -rf "${ZDOTDIR:-$HOME}/.${rcfile:t}"
  18. echo "[*] Symlinking $rcfile -> ${ZDOTDIR:-$HOME}/.${rcfile:t}"
  19. ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
  20. done
  21. fi
  22. echo -n "[*] Copy (and overwrite) dotfiles? [y/n] "
  23. read yesno
  24. if [[ "$yesno" == "y" ]]; then
  25. backup_dir=/tmp/dotfiles-backup-$(date "+%H%M%S")
  26. rsync --backup --backup-dir $backup_dir --exclude profiles --exclude .git/ --exclude install.sh --exclude setup_kali.sh --exclude usr/ -r . $HOME
  27. echo "[+] Dotfiles installed :) Backup available @ $backup_dir"
  28. fi
  29. echo -n "[*] Copy icons and themes? [y/n] "
  30. read yesno
  31. if [[ "$yesno" == "y" ]]; then
  32. sudo rsync --exclude profiles --exclude .git/ --exclude install.sh --exclude setup_kali.sh -a ./usr /
  33. echo "[+] Copied Themes/Icons -> Enable via lxappearance"
  34. fi
  35. echo -n "[*] Do you want to pywal? [y/n] "
  36. read yesno
  37. if [[ "$yesno" == "y" ]]; then
  38. sudo pip3 install pywal
  39. fi
  40. # Installing custom profile
  41. echo -n "[*] Do you want to install custom profile? [y/n] "
  42. read yesno
  43. if [[ "$yesno" == "y" ]]; then
  44. pf=$(ls ./profiles)
  45. profiles=(${=pf})
  46. for i ("$profiles[@]") ; do
  47. print -r -- "> $i"
  48. done
  49. echo -n "[*] Enter profile name: "
  50. read profilename
  51. if [[ " ${profiles[*]} " =~ " ${profilename} " ]];
  52. then
  53. echo "[+] Found profile, copying files..."
  54. backup_dir=/tmp/dotfiles-backup-profile-$(date "+%H%M%S")
  55. rsync --backup --backup-dir $backup_dir --exclude .git/ --exclude install.sh --exclude setup_kali.sh -r "./profiles/$profilename/" $HOME
  56. else
  57. echo "[-] Profile not found, continuing"
  58. fi
  59. fi
  60. # Creating vim folders
  61. mkdir -p $HOME/.config/nvim/backups
  62. mkdir -p $HOME/.config/nvim/undo
  63. # Creating other needed folders
  64. mkdir -p $HOME/documents
  65. mkdir -p $HOME/documents/tools
  66. mkdir -p $HOME/documents/bin
  67. # setup SSH Folders & default import rule
  68. mkdir -p $HOME/.ssh
  69. mkdir -p $HOME/.ssh/config.d/
  70. echo "Include config.d/*" > $HOME/.ssh/config
  71. # Cleaning default folders
  72. rm -rf $HOME/Documents
  73. rm -rf $HOME/Pictures
  74. rm -rf $HOME/Public
  75. rm -rf $HOME/Templates
  76. rm -rf $HOME/Music
  77. rm -rf $HOME/Videos
  78. rm -rf $HOME/Desktop
  79. # setting suid on `light` for background lighting via function keys
  80. sudo chmod u+s $(which light)
  81. echo "[INFO] Switch the default downloads folder to 'downloads' in Firefox!"
  82. echo "[+] Done :)"