redact-install-on-arch.sh 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749
  1. #!/bin/bash
  2. # Config created by user
  3. # Copyright (C) 2022 user
  4. # mkdir -p ~/.dotfiles
  5. # -----------------------------------------------------------------------------
  6. # --- SETTINGS
  7. # -----------------------------------------------------------------------------
  8. config_directory="$HOME/.config"
  9. fonts_directory="/usr/share/fonts"
  10. scripts_directory="/usr/local/bin"
  11. gtk_theme_directory="/usr/share/themes"
  12. green='\033[0;32m'
  13. magenta='\x1b[38;5;206m'
  14. normal='\033[0m'
  15. bold='\033[1m'
  16. no_color='\033[0m'
  17. date=$(date +%s)
  18. # -----------------------------------------------------------------------------
  19. # --- INSTALL DIALOG
  20. # -----------------------------------------------------------------------------
  21. sudo pacman --noconfirm --needed -Sy dialog less
  22. # -----------------------------------------------------------------------------
  23. # --- SYSTEM UPDATE
  24. # -----------------------------------------------------------------------------
  25. system_update() {
  26. echo -e "${green}${bold}[*] DOING A SYSTEM UPDATE, CAUSE STUFF MAY BREAK IF IT'S NOT THE LATEST VERSION...${normal}${no_color}"
  27. echo
  28. sleep 1
  29. sudo pacman -Sy --noconfirm archlinux-keyring
  30. sudo pacman --noconfirm -Syu
  31. sudo pacman -S --noconfirm --needed base-devel wget git curl
  32. echo
  33. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  34. echo
  35. }
  36. # -----------------------------------------------------------------------------
  37. # --- INSTALL AUR HELPER
  38. # -----------------------------------------------------------------------------
  39. install_aur_helper() {
  40. if ! command -v "$aurhelper" &>/dev/null; then
  41. echo -e "${green}${bold}[*] IT SEEMS THAT YOU DON'T HAVE $aurhelper INSTALLED, I'LL INSTALL THAT FOR YOU BEFORE CONTINUING.${normal}${no_color}"
  42. echo
  43. sleep 1
  44. git clone https://aur.archlinux.org/"$aurhelper".git $HOME/.srcs/"$aurhelper"
  45. (cd $HOME/.srcs/"$aurhelper"/ && makepkg -si)
  46. else
  47. echo -e "${green}[*] IT SEEMS THAT YOU ALREADY HAVE $aurhelper INSTALLED, SKIPPING.${no_color}"
  48. echo
  49. sleep 1
  50. fi
  51. echo
  52. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  53. echo
  54. }
  55. # -----------------------------------------------------------------------------
  56. # --- INSTALL PACKAGES WHIT PACMAN
  57. # -----------------------------------------------------------------------------
  58. install_pkgs() {
  59. echo -e "${green}${bold}[*] INSTALLING PACKAGES WITH PACMAN...${normal}${no_color}"
  60. echo
  61. sleep 1
  62. PKGS=(
  63. # INSTALLING XORG ---------------------------------------------------------
  64. 'xorg'
  65. 'xorg-server'
  66. 'xorg-apps'
  67. 'xorg-xinit'
  68. 'xf86-video-intel'
  69. 'mesa'
  70. 'acpi' # ACPI (Advanced Configuration and Power Interface)
  71. 'pacman-contrib' # Contributed scripts and tools for pacman systems
  72. 'base-devel'
  73. 'curl'
  74. 'git'
  75. 'wget'
  76. 'xfce4-power-manager'
  77. # TERMINAL EMULATOR -------------------------------------------------------
  78. 'alacritty'
  79. 'kitty'
  80. # TERMINAL UTILITES -------------------------------------------------------
  81. 'htop'
  82. 'neovim'
  83. 'neofetch'
  84. 'feh'
  85. 'dunst'
  86. # 'scrot'
  87. 'flameshot'
  88. 'xclip'
  89. 'fish'
  90. 'file-roller'
  91. 'sbxkb'
  92. 'gufw'
  93. 'hardinfo'
  94. 'inxi'
  95. 'jq'
  96. 'jshon'
  97. 'ntp'
  98. 'numlockx'
  99. 'openssh'
  100. 'rsync'
  101. 'tlp'
  102. 'pass'
  103. 'ripgrep'
  104. 'fzf'
  105. # 'picom'
  106. 'yt-dlp'
  107. # 'tmux'
  108. 'man-db'
  109. 'cmatrix'
  110. 'ncdu'
  111. 'calcurse'
  112. 'unclutter'
  113. 'bat'
  114. 'exa'
  115. 'dosfstools'
  116. 'brightnessctl'
  117. 'lazygit'
  118. # MEDIA -------------------------------------------------------------------
  119. 'mpd'
  120. 'ncmpcpp'
  121. 'mpv'
  122. 'cmus'
  123. 'ffmpeg'
  124. 'alsa-utils'
  125. 'pavucontrol'
  126. # PRODUCTIVITY ------------------------------------------------------------
  127. 'galculator'
  128. 'zathura'
  129. 'zathura-pdf-mupdf'
  130. 'obsidian'
  131. # FILEMANAGER -------------------------------------------------------------
  132. 'nemo'
  133. 'ranger'
  134. 'mc'
  135. 'udiskie'
  136. # 'thunar'
  137. # 'thunar-archive-plugin'
  138. # 'thunar-volman'
  139. 'tumbler'
  140. # WEB TOOLS ---------------------------------------------------------------
  141. 'firefox'
  142. # 'links'
  143. # ARCHIVE -----------------------------------------------------------------
  144. 'unrar'
  145. 'unzip'
  146. 'zip'
  147. 'p7zip'
  148. # DISK UTILITIES ----------------------------------------------------------
  149. 'autofs'
  150. 'exfat-utils'
  151. 'gparted'
  152. 'gnome-disks'
  153. 'ntfs-3g'
  154. 'parted'
  155. 'gvfs'
  156. 'gvfs-mtp'
  157. 'gvfs-afc'
  158. 'gvfs-gphoto2'
  159. 'gvfs-nfs'
  160. 'gvfs-smb'
  161. 'xdg-utils'
  162. 'xdg-user-dirs-gtk'
  163. # GENERAL UTILITIES -------------------------------------------------------
  164. 'veracrypt' # Disc encryption utility
  165. 'keepassxc' # Pass manager
  166. 'catfish' # Filesystem search
  167. # GENERAL UTILITIES -------------------------------------------------------
  168. 'arc-gtk-theme'
  169. # 'lxappearance'
  170. # SYSTEM UTILITIES -------------------------------------------------------
  171. 'psutils'
  172. 'solaar' # logitech trackboll mouse settings
  173. # FONTS -------------------------------------------------------
  174. 'adobe-source-code-pro-fonts'
  175. 'nerd-fonts'
  176. 'noto-fonts'
  177. 'noto-fonts-emoji'
  178. 'noto-fonts-cjk'
  179. 'ttf-jetbrains-mono'
  180. 'ttf-joypixels'
  181. 'ttf-font-awesome'
  182. 'ttf-hack'
  183. 'terminus-font'
  184. )
  185. for PKG in "${PKGS[@]}"; do
  186. sudo pacman -S "$PKG" --noconfirm --needed
  187. done
  188. echo
  189. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  190. echo
  191. }
  192. # -----------------------------------------------------------------------------
  193. # --- INSTALL PACKAGES WITH $aurhelper
  194. # -----------------------------------------------------------------------------
  195. install_aur_pkgs() {
  196. echo -e "${green}${bold}[*] INSTALLING PACKAGES WITH $aurhelper...${normal}${no_color}"
  197. echo
  198. sleep 1
  199. PKGS=(
  200. 'cava'
  201. # 'ueberzug'
  202. 'volctl'
  203. 'caffeine-ng'
  204. # 'picom-git'
  205. 'brother-hl1210w'
  206. # 'ueberzugpp'
  207. )
  208. for PKG in "${PKGS[@]}"; do
  209. "$aurhelper" -S "$PKG" --noconfirm --needed
  210. done
  211. echo
  212. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  213. echo
  214. }
  215. # -----------------------------------------------------------------------------
  216. # --- INSTALL DEVELOPMENT
  217. # -----------------------------------------------------------------------------
  218. install_development() {
  219. echo -e "${green}${bold}[*] INSTALLING DEVELOPMENT...${normal}${no_color}"
  220. echo
  221. sleep 1
  222. PKGS=(
  223. 'nodejs'
  224. 'npm'
  225. 'yarn'
  226. 'pyenv'
  227. 'filezilla'
  228. 'code'
  229. 'tmux'
  230. 'neovim'
  231. 'dbeaver'
  232. # NOTE: add docker, postgresql
  233. )
  234. for PKG in "${PKGS[@]}"; do
  235. sudo pacman -S "$PKG" --noconfirm --needed
  236. done
  237. echo
  238. echo -e "${magenta}${bold}[+] DONE ------------------------------------------${normal}${no_color}"
  239. echo
  240. }
  241. # -----------------------------------------------------------------------------
  242. # --- INSTALL GRAPHICS AND DESIGN
  243. # -----------------------------------------------------------------------------
  244. install_graphics() {
  245. echo -e "${green}${bold}[*] INSTALLING GRAPHICS AND DESIGN...${normal}${no_color}"
  246. echo
  247. sleep 1
  248. PKGS=(
  249. # 'gcolor2'
  250. 'gcolor3'
  251. # 'gimp'
  252. 'inkscape'
  253. # 'krita'
  254. 'imagemagick'
  255. # 'nomacs'
  256. 'pngcrush'
  257. # 'ristretto'
  258. 'sxiv'
  259. )
  260. for PKG in "${PKGS[@]}"; do
  261. sudo pacman -S "$PKG" --noconfirm --needed
  262. done
  263. echo
  264. echo -e "${magenta}${bold}[+] DONE ------------------------------------------${normal}${no_color}"
  265. echo
  266. }
  267. # -----------------------------------------------------------------------------
  268. # --- INSTALL NETWORK
  269. # -----------------------------------------------------------------------------
  270. install_network() {
  271. echo -e "${green}${bold}[*] INSTALLING NETWORK...${normal}${no_color}"
  272. echo
  273. sleep 1
  274. PKGS=(
  275. 'wpa_supplicant'
  276. # 'dialog'
  277. 'networkmanager'
  278. 'openvpn'
  279. 'networkmanager-openvpn'
  280. 'networkmanager-vpnc'
  281. 'network-manager-applet'
  282. 'dhclient'
  283. 'libsecret'
  284. 'dnsutils'
  285. 'dhcpcd'
  286. )
  287. for PKG in "${PKGS[@]}"; do
  288. sudo pacman -S "$PKG" --noconfirm --needed
  289. done
  290. # sudo systemctl enable NetworkManager.service
  291. # sudo systemctl start NetworkManager.service
  292. echo
  293. echo -e "${magenta}${bold}[+] DONE ------------------------------------------${normal}${no_color}"
  294. echo
  295. }
  296. # -----------------------------------------------------------------------------
  297. # --- INSTALL PRINTERS & SACANNERS
  298. # -----------------------------------------------------------------------------
  299. install_printers_scanners() {
  300. echo -e "${green}${bold}[*] INSTALLING PRINTERS & SACANNERS...${normal}${no_color}"
  301. echo
  302. sleep 1
  303. PKGS=(
  304. 'cups'
  305. 'cups-pdf'
  306. 'ghostscript'
  307. 'gsfonts'
  308. 'system-config-printer'
  309. 'skanlite'
  310. 'simple-scan'
  311. 'sane'
  312. 'sane-airscan'
  313. )
  314. for PKG in "${PKGS[@]}"; do
  315. sudo pacman -S "$PKG" --noconfirm --needed
  316. done
  317. # sudo systemctl enable org.cups.cupsd.service
  318. # sudo systemctl start org.cups.cupsd.service
  319. # sudo systemctl enable --now cups
  320. echo
  321. echo -e "${magenta}${bold}[+] DONE ------------------------------------------${normal}${no_color}"
  322. echo
  323. }
  324. # -----------------------------------------------------------------------------
  325. # --- INSTALL BLUETOOTH
  326. # -----------------------------------------------------------------------------
  327. install_bluetooth() {
  328. echo -e "${green}${bold}[*] INSTALLING BLUETOOTH...${normal}${no_color}"
  329. echo
  330. sleep 1
  331. PKGS=(
  332. 'bluez'
  333. 'bluez-utils'
  334. 'bluez-firmware'
  335. # 'blueberry'
  336. 'pulseaudio-bluetooth'
  337. 'blueman'
  338. )
  339. for PKG in "${PKGS[@]}"; do
  340. sudo pacman -S "$PKG" --noconfirm --needed
  341. done
  342. # sudo systemctl enable bluetooth
  343. # sudo systemctl start bluetooth
  344. echo
  345. echo -e "${magenta}${bold}[+] DONE ------------------------------------------${normal}${no_color}"
  346. echo
  347. }
  348. # -----------------------------------------------------------------------------
  349. # --- INSTALL VIRTUAL MACHINE
  350. # -----------------------------------------------------------------------------
  351. install_vm() {
  352. echo -e "${green}${bold}[*] INSTALLING QEMU A GENERIC AND OPEN SOURCE MACHINE EMULATOR AND VIRTUALIZER...${normal}${no_color}"
  353. echo
  354. sleep 1
  355. PKGS=(
  356. 'virt-manager'
  357. 'qemu'
  358. 'bridge-utils'
  359. 'ebtables'
  360. )
  361. for PKG in "${PKGS[@]}"; do
  362. sudo pacman -S "$PKG" --noconfirm --needed
  363. done
  364. # sudo systemctl enable libvirtd
  365. # sudo systemctl enable ebtables
  366. # sudo systemctl enable dnsmasq
  367. # sudo gpasswd -a user libvirt
  368. # sudo gpasswd -a user kvm
  369. echo
  370. echo -e "${magenta}${bold}[+] DONE ------------------------------------------${normal}${no_color}"
  371. echo
  372. }
  373. # -----------------------------------------------------------------------------
  374. # --- CREATE DEFAULT DIRECTORIES
  375. # -----------------------------------------------------------------------------
  376. create_default_directories() {
  377. echo -e "${green}${bold}[*] COPYING CONFIGS TO $config_directory...${normal}${no_color}"
  378. echo
  379. sleep 1
  380. mkdir -p "$HOME"/.config && echo -e "${magenta}- [+] DONE -> .config/"
  381. sudo mkdir -p /usr/local/bin && echo -e "${magenta}- [+] DONE -> /usr/local/bin"
  382. sudo mkdir -p /usr/share/themes && echo -e "${magenta}- [+] DONE -> /usr/share/themes"
  383. mkdir -p "$HOME"/Pictures/wallpapers && echo -e "${magenta}- [+] DONE -> /Pictures/wallpapers"
  384. echo
  385. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  386. echo
  387. }
  388. # -----------------------------------------------------------------------------
  389. # --- CREATE BACKUP
  390. # -----------------------------------------------------------------------------
  391. create_backup() {
  392. echo -e "${green}${bold}[*] INSTALLING CREATING BACKUP OF EXISTING CONFIGS...${normal}${no_color}"
  393. echo
  394. sleep 1
  395. [ -d "$config_directory"/alacritty ] && mv "$config_directory"/alacritty "$config_directory"/alacritty_$date && echo "alacritty configs detected, backing up."
  396. [ -d "$config_directory"/kitty ] && mv "$config_directory"/kitty "$config_directory"/kitty_$date && echo "alacritty configs detected, backing up."
  397. [ -d "$config_directory"/dunst ] && mv "$config_directory"/dunst "$config_directory"/dunst_$date && echo "dunst configs detected, backing up."
  398. [ -d "$config_directory"/mpd ] && mv "$config_directory"/mpd "$config_directory"/mpd_$date && echo "mpd configs detected, backing up."
  399. [ -d "$config_directory"/ncmpcpp ] && mv "$config_directory"/ncmpcpp "$config_directory"/ncmpcpp_$date && echo "ncmpcpp configs detected, backing up."
  400. [ -d "$config_directory"/ranger ] && mv "$config_directory"/ranger "$config_directory"/ranger_$date && echo "ranger configs detected, backing up."
  401. [ -d "$config_directory"/zathura ] && mv "$config_directory"/zathura "$config_directory"/zathura_$date && echo "zathura configs detected, backing up."
  402. [ -d "$config_directory"/picom ] && mv "$config_directory"/picom "$config_directory"/picom_$date && echo "picom configs detected, backing up."
  403. [ -f "$config_directory"/Code\ -\ OSS/User/settings.json ] && mv "$config_directory"/Code\ -\ OSS/User/settings.json "$config_directory"/Code\ -\ OSS/User/settings.json_$date && echo "Vsc configs detected, backing up."
  404. # [ -d "$config_directory"/neofetch ] && mv "$config_directory"/neofetch "$config_directory"/neofetch_$date && echo "neofetch configs detected, backing up."
  405. # [ -d "$config_directory"/nvim ] && mv "$config_directory"/nvim "$config_directory"/nvim_$date && echo "nvim configs detected, backing up."
  406. # [ -d "$config_directory"/polybar ] && mv "$config_directory"/polybar "$config_directory"/polybar_$date && echo "polybar configs detected, backing up."
  407. # [ -d "$scripts_directory" ] && sudo mv "$scripts_directory" "$scripts_directory"_$date && echo "scripts ($scripts_directory) detected, backing up."
  408. # [ -f /etc/fonts/local.conf ] && sudo mv /etc/fonts/local.conf /etc/fonts/local.conf_$date && echo "Fonts configs detected, backing up."
  409. echo
  410. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  411. echo
  412. }
  413. # -----------------------------------------------------------------------------
  414. # --- COPY CONFIGS
  415. # -----------------------------------------------------------------------------
  416. copy_configs() {
  417. echo -e "${green}${bold}[*] COPYING CONFIG TO... $config_directory ${normal}${no_color}"
  418. echo
  419. sleep 1
  420. cp -r $HOME/.dotfiles/config/* "$config_directory"
  421. # Symlinks Config
  422. ln -s $HOME/.dotfiles/other_config/alias ~/.alias
  423. ln -s $HOME/.dotfiles/other_config/tmux.conf ~/.tmux.conf
  424. ln -s $HOME/.dotfiles/other_config/xinitrc ~/.xinitrc
  425. ln -s $HOME/.dotfiles/other_config/Xresources ~/.Xresources
  426. cp -r $HOME/.dotfiles/other_config/gtkrc-2.0 ~/.gtkrc-2.0
  427. cp -r $HOME/.dotfiles/config/gtk-2.0 ~/.config
  428. cp -r $HOME/.dotfiles/config/gtk-3.0 ~/.config
  429. rm $HOME/.config/alacritty/alacritty.yml
  430. ln -s $HOME/.dotfiles/config/alacritty/alacritty.yml $HOME/.config/alacritty/alacritty.yml
  431. rm $HOME/.config/cava/config
  432. ln -s $HOME/.dotfiles/config/cava/config $HOME/.config/cava/config
  433. rm $HOME/.config/dunst/dunstrc
  434. ln -s $HOME/.dotfiles/config/dunst/dunstrc $HOME/.config/dunst/dunstrc
  435. rm $HOME/.config/kitty/kitty.conf
  436. ln -s $HOME/.dotfiles/config/kitty/kitty.conf $HOME/.config/kitty/kitty.conf
  437. rm $HOME/.config/mpd/mpd.conf
  438. ln -s $HOME/.dotfiles/config/mpd/mpd.conf $HOME/.config/mpd/mpd.conf
  439. rm $HOME/.config/mpv/mpv.conf
  440. ln -s $HOME/.dotfiles/config/mpv/mpv.conf $HOME/.config/mpv/mpv.conf
  441. rm $HOME/.config/ncmpcpp/config
  442. ln -s $HOME/.dotfiles/config/ncmpcpp/config $HOME/.config/ncmpcpp/config
  443. rm $HOME/.config/ranger/rc.conf
  444. ln -s $HOME/.dotfiles/config/ranger/rc.conf $HOME/.config/ranger/rc.conf
  445. rm $HOME/.config/zathura/zathurarc
  446. ln -s $HOME/.dotfiles/config/zathura/zathurarc $HOME/.config/zathura/zathurarc
  447. rm $HOME/.config/picom/picom.conf
  448. ln -s $HOME/.dotfiles/config/picom/picom.conf $HOME/.config/picom/picom.conf
  449. rm $HOME/.config/bspwm/bspwmrc
  450. ln -s $HOME/.dotfiles/config/bspwm/bspwmrc $HOME/.config/bspwm/bspwmrc
  451. rm $HOME/.config/sxhkd/sxhkdrc
  452. ln -s $HOME/.dotfiles/config/sxhkd/sxhkdrc $HOME/.config/sxhkd/sxhkdrc
  453. rm $HOME/.config/polybar/config.ini
  454. ln -s $HOME/.dotfiles/config/polybar/config.ini $HOME/.config/polybar/config.ini
  455. echo
  456. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  457. echo
  458. }
  459. # -----------------------------------------------------------------------------
  460. # --- COPY SCRIPTS
  461. # -----------------------------------------------------------------------------
  462. copy_scripts() {
  463. echo -e "${green}[*] COPYING SCRIPTS TO... $scripts_directory.${no_color}"
  464. echo
  465. sleep 1
  466. # sudo cp -r ./scripts/* "$scripts_directory"
  467. echo "COPY MY SCRIPTS ..."
  468. echo
  469. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  470. echo
  471. }
  472. # -----------------------------------------------------------------------------
  473. # --- FINISHING
  474. # -----------------------------------------------------------------------------
  475. finishing() {
  476. echo -e "${green}[*] FINISHING... $scripts_directory.${no_color}"
  477. echo
  478. sleep 1
  479. fc-cache -fv
  480. echo "[ -f ~/.alias ] && source ~/.alias" >>$HOME/.bashrc
  481. echo "[ -f ~/.alias ] && source ~/.alias" >>$HOME/.config/fish/config.fish
  482. sudo systemctl enable NetworkManager.service
  483. sudo systemctl start NetworkManager.service
  484. sudo systemctl enable org.cups.cupsd.service
  485. sudo systemctl start org.cups.cupsd.service
  486. sudo systemctl enable --now cups
  487. sudo systemctl enable bluetooth
  488. sudo systemctl start bluetooth
  489. sudo systemctl enable libvirtd
  490. sudo systemctl enable ebtables
  491. sudo systemctl enable dnsmasq
  492. sudo gpasswd -a user libvirt
  493. sudo gpasswd -a user kvm
  494. cp -r $HOME/.dotfiles/wallpaper/* $HOME/Pictures/wallpapers
  495. cp -r $HOME/.dotfiles/ThemeIcons/kora-1-5-6 $HOME/.icons
  496. git clone https://github.com/alexanderjeurissen/ranger_devicons ~/.config/ranger/plugins/ranger_devicons
  497. echo
  498. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  499. echo
  500. }
  501. # TODO: INSTALL WM TODIALOG DWM DWM_FLEXIPATCH QTILE BSPWM
  502. # -----------------------------------------------------------------------------
  503. # --- INSTALL DWM
  504. # -----------------------------------------------------------------------------
  505. install_dwm() {
  506. echo -e "${green}[*] INSTALL DWM...${no_color}"
  507. echo
  508. sleep 1
  509. [ -d "$config_directory"/suckless ] && rm -rf "$config_directory"/suckless
  510. cp -r $HOME/.dotfiles/WM/suckless/ "$config_directory"/suckless
  511. cd $HOME/.config/suckless/dwm-6.4
  512. sudo make uninstall
  513. sudo make clean install
  514. echo -e "${magenta}[+] DWM INSTALLED ---${normal}${no_color}"
  515. cd $HOME/.config/suckless/dmenu-5.2
  516. sudo make uninstall
  517. sudo make clean install
  518. echo -e "${magenta}[+] DMENU INSTALLED ---${normal}${no_color}"
  519. cd $HOME/.config/suckless/st-0.9
  520. sudo make uninstall
  521. sudo make clean install
  522. echo -e "${magenta}[+] ST INSTALLED ---${normal}${no_color}"
  523. cd $HOME/.config/suckless/slstatus
  524. sudo make uninstall
  525. sudo make clean install
  526. echo -e "${magenta}[+] SLSTATUS INSTALLED ---${normal}${no_color}"
  527. cd $HOME/.config/suckless/slock-1.5
  528. sudo make uninstall
  529. sudo make clean install
  530. echo -e "${magenta}[+] SLOCK INSTALLED ---${normal}${no_color}"
  531. cd
  532. echo
  533. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  534. echo
  535. }
  536. # -----------------------------------------------------------------------------
  537. # --- INSTALL QTILE
  538. # -----------------------------------------------------------------------------
  539. install_qtile() {
  540. echo -e "${green}${bold}[*] INSTALLING QTILE WM ...${normal}${no_color}"
  541. echo
  542. sleep 1
  543. PKGS=(
  544. 'qtile'
  545. )
  546. for PKG in "${PKGS[@]}"; do
  547. sudo pacman -S "$PKG" --noconfirm --needed
  548. done
  549. echo
  550. echo -e "${magenta}${bold}[+] DONE ------------------------------------------${normal}${no_color}"
  551. echo
  552. }
  553. cmd=(dialog --clear --title "Aur helper" --menu "Firstly, select the aur helper you want to install (or have already installed)." 10 50 16)
  554. options=(1 "yay" 2 "paru")
  555. choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
  556. case $choices in
  557. 1) aurhelper="yay" ;;
  558. 2) aurhelper="paru" ;;
  559. esac
  560. cmd=(dialog --clear --separate-output --checklist "Select (with space) what script should do.\\nChecked options are required for proper installation, do not uncheck them if you do not know what you are doing." 26 86 16)
  561. options=(
  562. 1 "System update" on
  563. 2 "Install aur helper" on
  564. 3 "Install basic packages" on
  565. 4 "Install basic packages (aur)" on
  566. 5 "Install development" on
  567. 6 "Install graphics and design" on
  568. 7 "Install network" on
  569. 8 "Install printers & sacanners" on
  570. 9 "Install bluetooth" on
  571. 10 "Install virtual machine" off
  572. 11 "Create default directories" on
  573. 12 "Create backup of existing configs (to prevent overwritting)" off
  574. 13 "Copy configs" on
  575. 14 "Copy scripts" on
  576. 15 "Alias, Enable Services" on
  577. )
  578. choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
  579. clear
  580. for choice in $choices; do
  581. case $choice in
  582. 1) system_update ;;
  583. 2) install_aur_helper ;;
  584. 3) install_pkgs ;;
  585. 4) install_aur_pkgs ;;
  586. 5) install_development ;;
  587. 6) install_graphics ;;
  588. 7) install_network ;;
  589. 8) install_printers_scanners ;;
  590. 9) install_bluetooth ;;
  591. 10) install_vm ;;
  592. 11) create_default_directories ;;
  593. 12) create_backup ;;
  594. 13) copy_configs ;;
  595. 14) copy_scripts ;;
  596. 15) finishing ;;
  597. esac
  598. done
  599. cmd=(dialog --clear --separate-output --checklist "Select (with space) what script should do.\\nChecked options are required for proper installation, do not uncheck them if you do not know what you are doing." 26 86 16)
  600. options=(
  601. 1 "Install DWM 6.4 (Window Manager)" on
  602. 2 "Install Qtile (Window Manager)" off
  603. )
  604. choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
  605. clear
  606. for choice in $choices; do
  607. case $choice in
  608. 1) install_dwm ;;
  609. 2) install_qtile ;;
  610. esac
  611. done