void_dialog.sh 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  1. #!/bin/bash
  2. # VOID LINUX POST INSTALL DIALOG
  3. # -----------------------------------------------------------------------------
  4. # 0. settings
  5. # 1. INSTALL DIALOG
  6. # 2. SYSTEM UPDATE
  7. # 3. INSTALL BASE SYSTEM
  8. # -> CORE
  9. # -> NETWORK
  10. # -> VIDEO
  11. # -> AUDIO
  12. # -> XORG
  13. # 4. INSTALL PKGS
  14. # 5. INSTALL DEVELOPMENT PKGS
  15. # 6. INSTALL GRAPHICS PKGS
  16. # 7. INSTALL PRINTERS & SCANNERS PKGS
  17. # 8. INSTALL BLUETOOTH PKGS
  18. # 9. INSTALL VIRTUAL MANAGER
  19. # 10. COPY CONFIG
  20. # 11. FINAL
  21. # -----------------------------------------------------------------------------
  22. # --- SETTINGS
  23. # -----------------------------------------------------------------------------
  24. config_directory="$HOME/.config"
  25. green='\033[0;32m'
  26. magenta='\x1b[38;5;206m'
  27. normal='\033[0m'
  28. bold='\033[1m'
  29. no_color='\033[0m'
  30. date=$(date +%s)
  31. # -----------------------------------------------------------------------------
  32. # --- INSTALL DIALOG
  33. # -----------------------------------------------------------------------------
  34. sudo xbps-install -Sy dialog # Tool to display dialog boxes from shell scripts
  35. # -----------------------------------------------------------------------------
  36. # --- 1. SYSTEM UPDATE
  37. # -----------------------------------------------------------------------------
  38. system_update(){
  39. echo -e "${green}${bold}[*] DOING A SYSTEM UPDATE, CAUSE STUFF MAY BREAK IF IT'S NOT THE LATEST VERSION ...${normal}${no_color}"
  40. echo
  41. sleep 1
  42. sudo xbps-install -Suy
  43. sudo xbps-install -Sy void-repo-nonfree
  44. sudo xbps-install -Sy void-repo-multilib
  45. sudo xbps-install -Sy void-repo-multilib-nonfree
  46. vkpurge rm all # Delete old cores
  47. echo
  48. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  49. echo
  50. }
  51. # -----------------------------------------------------------------------------
  52. # --- 2. INSTALL BASE SYSTEM
  53. # -----------------------------------------------------------------------------
  54. install_base_system(){
  55. echo -e "${green}${bold}[*] INSTALLING BASE SYSTEM ...${normal}${no_color}"
  56. echo
  57. sleep 1
  58. PKGS=(
  59. # CORE ----------------------------------------------------------------
  60. 'base-devel' # Void Linux development tools meta package
  61. 'linux-firmware-intel' # Binary firmware blobs for the Linux kernel - Intel CPU/GPU microcode
  62. 'dbus' # Message bus system
  63. 'dbus-elogind' # Message bus system (transitional dummy package)
  64. 'elogind' # Standalone logind fork
  65. 'polkit' # Authorization Toolkit
  66. # 'seatd' # Minimal seat management daemon
  67. 'acpi' # Informations about ACPI devices (battery, thermal sensors and power)
  68. # NETWORK -------------------------------------------------------------
  69. 'NetworkManager' # Network Management daemon
  70. 'NetworkManager-openvpn' # NetworkManager VPN plugin for OpenVPN
  71. 'NetworkManager-vpnc' # NetworkManager VPN plugin for VPNC
  72. 'network-manager-applet' # NetworkManager panel applet for GNOME
  73. 'wpa_supplicant' # WPA/WPA2/IEEE 802.1X Supplicant
  74. 'openvpn' # Easy-to-use, robust, and highly configurable VPN
  75. 'dhcpcd' # RFC2131 compliant DHCP client
  76. 'dhclient' # Client from the Internet Software Consortium's implementation of DHCP
  77. 'libsecret' # GObject based library for accessing the Secret Service API
  78. # VIDEO ---------------------------------------------------------------
  79. 'mesa' # Open source implementation of OpenGL and Vulkan
  80. 'mesa-dri' # Mesa DRI drivers
  81. 'mesa-intel-dri' # Mesa DRI drivers for Intel GPUs (transitional dummy package)
  82. 'mesa-vulkan-intel' # Mesa Intel Vulkan driver
  83. 'xf86-video-intel' # Xorg DDX Intel video driver
  84. 'intel-video-accel' # Intel Video Acceleration meta-pkg
  85. 'nvidia' # NVIDIA drivers for linux - Libraries and Utilities
  86. # AUDIO ---------------------------------------------------------------
  87. 'pulseaudio' # Featureful, general-purpose sound server
  88. 'alsa-utils' # Advanced Linux Sound Architecture (ALSA) utilities
  89. 'alsa-plugins-pulseaudio' # Advanced Linux Sound Architecture (ALSA) extra plugins - Pulseaudio output plugin
  90. 'pipewire' # Server and user space API to deal with multimedia pipelines
  91. 'alsa-pipewire' # Server and user space API to deal with multimedia pipelines - ALSA client library
  92. 'apulse' # PulseAudio emulation for ALSA
  93. 'AlsaMixer.app' # Simple dockable mixer application for Linux with ALSA drivers
  94. # XORG ----------------------------------------------------------------
  95. 'xorg' # X.org meta-package
  96. 'xorg-server' # X11 server from X.org
  97. 'xorg-apps' # X.org applications
  98. 'libX11' # Base X libraries from Xorg
  99. 'libX11-devel' # Base X libraries from Xorg - development files
  100. 'libXft-devel' # Library for configuring and customizing font access - development files
  101. 'libXinerama-devel' # X PanoramiX extension library - development files
  102. 'freetype-devel' # Font rendering engine and library API - development files
  103. 'fontconfig-devel' # Library for configuring and customizing font access - development files
  104. )
  105. for PKG in "${PKGS[@]}"; do
  106. echo -e "${green}${bold}[*] START "$PKG" ---${normal}${no_color}"
  107. sudo xbps-install -Sy "$PKG"
  108. echo -e "${magenta}${bold}[+] DONE "$PKG" ---${normal}${no_color}"
  109. echo
  110. sleep 1
  111. done
  112. echo
  113. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  114. echo
  115. }
  116. # -----------------------------------------------------------------------------
  117. # --- 3. INSTALL PKGS
  118. # -----------------------------------------------------------------------------
  119. install_pkgs(){
  120. echo -e "${green}${bold}[*] INSTALLING PKGS ...${normal}${no_color}"
  121. echo
  122. sleep 1
  123. PKGS=(
  124. # TERMINALS -----------------------------------------------------------
  125. 'alacritty' # Cross-platform, GPU-accelerated terminal emulator
  126. 'kitty' # Modern, hackable, featureful, OpenGL based terminal emulator
  127. # INTERNET ------------------------------------------------------------
  128. 'firefox' # Mozilla Firefox web browser
  129. 'qbittorrent' # Free software alternative to µtorrent
  130. # PKGS ----------------------------------------------------------------
  131. 'neovim' # Library for configuring and customizing font access - development files
  132. 'wget' # GNU wget download utility
  133. 'curl' # Client that groks URLs
  134. 'gnupg' # GNU Privacy Guard (2.x)
  135. 'numlockx' # Activate NumLock at startup
  136. 'chrony' # Versatile implementation of the Network Time Protocol (NTP) Служба времени
  137. # 'fbxkb' # Lightweight X keyboard layout indicator, uses GTK+2
  138. 'gxkb' # Lightweight GTK+3 X11 keyboard layout indicator and switcher
  139. 'psutils' # Set of utilities to manipulate PostScript files
  140. 'gufw' # GTK+ frontend for ufw
  141. 'hardinfo' # System information and benchmark tool
  142. 'inxi' # Full featured system information script
  143. 'jq' # Command-line JSON processor
  144. 'ntp' # Network Time Protocol daemon and utilities
  145. 'numlockx' # Activate NumLock at startup
  146. 'openssh' # OpenSSH free Secure Shell (SSH) client and server implementation
  147. 'rsync' # Remote fast incremental file transfer tool
  148. 'tlp' # Advanced power management tool for Linux
  149. 'git' # Git Tree History Storage Tool
  150. 'htop' # Interactive process viewer
  151. 'neofetch' # Simple system information script
  152. # 'pfetch' # System information tool written in POSIX sh
  153. 'dunst' # Lightweight and customizable notification daemon
  154. 'fish-shell' # User friendly shell intended mostly for interactive use
  155. 'man-db' # On-line manual database
  156. 'ripgrep' # Fast search tool inspired by ag and grep
  157. 'fzf' # Command-line fuzzy finder
  158. 'picom' # Lightweight compositor for X11 (previously a compton fork)
  159. 'yt-dlp' # CLI program to download videos from YouTube and other sites
  160. 'cmatrix' # Simulates the display from The Matrix
  161. 'ncdu' # NCurses Disk Usage utility
  162. 'calcurse' # Text-based calendar and scheduling application
  163. 'unclutter' # A small program for hiding the mouse cursor
  164. 'bat' # Cat(1) clone with syntax highlighting and Git integration
  165. 'exa' # Modern replacement for ls
  166. 'dosfstools' # DOS filesystem tools
  167. 'brightnessctl' # Read and control device brightness
  168. 'lazygit' # Simple terminal UI for git commands
  169. 'cava' # Console-based Audio Visualizer for ALSA
  170. 'ueberzug' # Command line util which allows drawing images on terminals
  171. 'volctl' # Lightweight volume control for pulseaudio in your systray
  172. 'caffeine-ng' # Temporarily inhibits the screensaver and sleep mode
  173. 'feh' # Fast and light imlib2-based image viewer
  174. 'xclip' # Command line interface to the X11 clipboard
  175. # ARHIVATORS ----------------------------------------------------------
  176. 'unrar' # Unarchiver for .rar files (non-free version)
  177. 'unzip' # List, test and extract compressed files in a ZIP archive
  178. 'zip' # Create/update ZIP files compatible with pkzip
  179. 'p7zip' # Command-line version of the 7zip compressed file archive (transitional dummy package)
  180. 'file-roller' # GNOME Front-end to archiving programs like tar and zip
  181. # FILEMANAGER ---------------------------------------------------------
  182. 'ranger' # File manager with an ncurses frontend written in Python
  183. 'mc' # User-friendly file manager and visual shell
  184. 'nemo' # Cinnamon file manager (nautilus fork)
  185. 'tumbler' # D-Bus Thumbnailer service
  186. # PASSWORDS -----------------------------------------------------------
  187. 'pass' # Stores, retrieves, generates, and synchronizes passwords securely
  188. 'zulucrypt-gui' # Frontend to cryptsetup and Veracrypt for harddrive and file encryption - GUI tools
  189. 'keepassxc' # KeePassXC is a cross-platform port of “Keepass Password Safe”
  190. 'catfish' # Versatile file search
  191. # MEDIA ---------------------------------------------------------------
  192. 'mpd' # Flexible, powerful, server-side application for playing music
  193. 'ncmpcpp' # Ncurses mpd client inspired by ncmpc
  194. 'mpv' # Video player based on MPlayer/mplayer2
  195. 'cmus' # Small, fast and powerful console music player
  196. 'ffmpeg' # Decoding, encoding and streaming software
  197. # PRODUCTIVITY --------------------------------------------------------
  198. 'galculator' # GTK+ based scientific calculator (GTK+3)
  199. 'zathura' # Highly customizable and functional document viewer
  200. 'zathura-pdf-mupdf' # PDF support for zathura (using mupdf)
  201. 'flameshot' # Powerful yet simple to use screenshot software for GNU/Linux
  202. 'sxiv' # Neo (or New or Not) Simple (or Small or Suckless) X Image Viewer - (transitional package)
  203. 'imagemagick' # Create, edit, compose, or convert bitmap images
  204. 'pngcrush' # Tool for optimizing the compression of PNG files
  205. # USER FOLDERS --------------------------------------------------------
  206. 'autofs' # Kernel-based automounter for Linux
  207. 'exfat-utils' # Utilities for exFAT file system
  208. # 'gparted' # Gnome Partition Editor
  209. 'ntfs-3g' # Stable Read/Write NTFS Driver in userspace
  210. 'parted' # GNU Parted disk partition resizing program
  211. 'gvfs' # Userspace virtual filesystem
  212. 'gvfs-mtp' # Userspace virtual filesystem - MTP backend
  213. 'gvfs-afc' # Userspace virtual filesystem - Apple mobile device backend
  214. 'gvfs-gphoto2' # Userspace virtual filesystem - gphoto2 (PTP camera/MTP media player) backend
  215. 'gvfs-smb' # Userspace virtual filesystem - SMB/CIFS (Windows client) backend
  216. 'udiskie' # Removable disk automounter using udisks
  217. 'udisks2' # Disk Management Service, version 2
  218. 'xdg-utils' # Tools to assist applications with various desktop integration tasks
  219. 'xdg-user-dirs-gtk' # GTK+ tool to help manage user directories
  220. 'xdg-user-dirs' # Tool to help manage user directories
  221. # THEME ---------------------------------------------------------------
  222. 'arc-theme' # Flat theme with transparent elements for GTK and GNOME Shell
  223. )
  224. for PKG in "${PKGS[@]}"; do
  225. echo -e "${green}${bold}[*] START "$PKG" ---${normal}${no_color}"
  226. sudo xbps-install -Sy "$PKG"
  227. echo -e "${magenta}${bold}[+] DONE "$PKG" ---${normal}${no_color}"
  228. echo
  229. sleep 1
  230. done
  231. echo
  232. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  233. echo
  234. }
  235. # -----------------------------------------------------------------------------
  236. # --- 4. INSTALL DEVELOPMENT PKGS
  237. # -----------------------------------------------------------------------------
  238. install_development_pkgs(){
  239. echo -e "${green}${bold}[*] INSTALLING DEVELOPMENT PKGS ...${normal}${no_color}"
  240. echo
  241. sleep 1
  242. PKGS=(
  243. # TERMINALS -----------------------------------------------------------
  244. 'nodejs' # Evented I/O for V8 javascript
  245. 'yarn' # Fast, reliable, and secure dependency management
  246. 'filezilla' # Fast and reliable FTP, FTPS and SFTP client
  247. 'vscode' # Microsoft Code for Linux
  248. 'tmux' # Terminal Multiplexer
  249. 'dbeaver' # Free Universal Database Tool
  250. )
  251. for PKG in "${PKGS[@]}"; do
  252. echo -e "${green}${bold}[*] START "$PKG" ---${normal}${no_color}"
  253. sudo xbps-install -Sy "$PKG"
  254. echo -e "${magenta}${bold}[+] DONE "$PKG" ---${normal}${no_color}"
  255. echo
  256. sleep 1
  257. done
  258. sleep 1
  259. # INSTALL ASTRONVIM -------------------------------------------------------
  260. mv ~/.config/nvim ~/.config/nvim.bak
  261. mv ~/.local/share/nvim ~/.local/share/nvim.bak
  262. mv ~/.local/state/nvim ~/.local/state/nvim.bak
  263. mv ~/.cache/nvim ~/.cache/nvim.bak
  264. git clone --depth 1 https://github.com/AstroNvim/AstroNvim ~/.config/nvim
  265. # ASTRONVIM USER SETTINGS -------------------------------------------------
  266. git clone https://notabug.org/tpp17/astro_nvim_user_v3.git $HOME/.config/nvim/lua/user
  267. echo
  268. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  269. echo
  270. }
  271. # -----------------------------------------------------------------------------
  272. # --- 5. INSTALL GRAPHICS PKGS
  273. # -----------------------------------------------------------------------------
  274. install_graphics_pkgs(){
  275. echo -e "${green}${bold}[*] INSTALLING GRAPHICS PKGS ...${normal}${no_color}"
  276. echo
  277. sleep 1
  278. PKGS=(
  279. 'gcolor3' # Color selection dialog written in GTK+3
  280. 'gimp' # GNU image manipulation program
  281. 'inkscape' # Vector-based drawing program
  282. 'krita' # Painting and image editing program
  283. )
  284. for PKG in "${PKGS[@]}"; do
  285. echo -e "${green}${bold}[*] START "$PKG" ---${normal}${no_color}"
  286. sudo xbps-install -Sy "$PKG"
  287. echo -e "${magenta}${bold}[+] DONE "$PKG" ---${normal}${no_color}"
  288. echo
  289. sleep 1
  290. done
  291. echo
  292. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  293. echo
  294. }
  295. # -----------------------------------------------------------------------------
  296. # --- 6. INSTALL PRINTERS & SCANNERS PKGS
  297. # -----------------------------------------------------------------------------
  298. install_printers_and_scanners_pkgs(){
  299. echo -e "${green}${bold}[*] INSTALLING PRINTERS & SCANNERS PKGS ...${normal}${no_color}"
  300. echo
  301. sleep 1
  302. PKGS=(
  303. 'cups' # Common Unix Printing System
  304. 'cups-filters' # OpenPrinting CUPS Filters
  305. 'cups-pdf' # PDF printer for cups
  306. 'ghostscript' # Interpreter for the PostScript language
  307. 'gsfonts' # URW+ base35 fonts
  308. 'system-config-printer' # CUPS printer configuration tool and status applet
  309. 'skanlite' # Image Scanning Application
  310. 'simple-scan' # GTK Simple scanning utility
  311. 'sane' # Scanner Access Now Easy
  312. 'sane-airscan' # SANE universal driver for eSCL (Apple AirScan) and WSD
  313. 'gutenprint' # Top quality printer drivers for POSIX systems
  314. )
  315. for PKG in "${PKGS[@]}"; do
  316. echo -e "${green}${bold}[*] START "$PKG" ---${normal}${no_color}"
  317. sudo xbps-install -Sy "$PKG"
  318. echo -e "${magenta}${bold}[+] DONE "$PKG" ---${normal}${no_color}"
  319. echo
  320. sleep 1
  321. done
  322. echo
  323. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  324. echo
  325. }
  326. # -----------------------------------------------------------------------------
  327. # --- 7. INSTALL BLUETOOTH PKGS
  328. # -----------------------------------------------------------------------------
  329. install_bluetooth_pkgs(){
  330. echo -e "${green}${bold}[*] INSTALLING BLUETOOTH PKGS ...${normal}${no_color}"
  331. echo
  332. sleep 1
  333. PKGS=(
  334. 'bluez' # Bluetooth tools and daemons
  335. 'bluez-alsa' # Bluetooth Audio ALSA Backend
  336. 'blueman' # GTK+ Bluetooth Manager
  337. # 'blueberry'
  338. # 'bluez-utils'
  339. # 'bluez-firmware'
  340. # 'pulseaudio-bluetooth'
  341. )
  342. for PKG in "${PKGS[@]}"; do
  343. echo -e "${green}${bold}[*] START "$PKG" ---${normal}${no_color}"
  344. sudo xbps-install -Sy "$PKG"
  345. echo -e "${magenta}${bold}[+] DONE "$PKG" ---${normal}${no_color}"
  346. echo
  347. sleep 1
  348. done
  349. echo
  350. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  351. echo
  352. }
  353. # -----------------------------------------------------------------------------
  354. # --- 8. INSTALL VIRTUAL MANAGER
  355. # -----------------------------------------------------------------------------
  356. install_virtual_manager_pkgs(){
  357. echo -e "${green}${bold}[*] INSTALLING QEMU A GENERIC AND OPEN SOURCE MACHINE EMULATOR AND VIRTUALIZER ...${normal}${no_color}"
  358. echo
  359. sleep 1
  360. PKGS=(
  361. 'virt-manager' # User interface for managing virtual machines
  362. 'qemu' # Open Source Processor Emulator
  363. 'bridge-utils' # Layer2 ethernet bridging for Linux
  364. # 'ebtables' # Filtering tool for a Linux-based bridging firewall (32bit)
  365. )
  366. for PKG in "${PKGS[@]}"; do
  367. echo -e "${green}${bold}[*] START "$PKG" ---${normal}${no_color}"
  368. sudo xbps-install -Sy "$PKG"
  369. echo -e "${magenta}${bold}[+] DONE "$PKG" ---${normal}${no_color}"
  370. echo
  371. sleep 1
  372. done
  373. echo
  374. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  375. echo
  376. }
  377. # -----------------------------------------------------------------------------
  378. # --- 9. INSTALL FONTS
  379. # -----------------------------------------------------------------------------
  380. install_fonts(){
  381. echo -e "${green}${bold}[*] INSTALLING FONTS ...${normal}${no_color}"
  382. echo
  383. sleep 1
  384. PKGS=(
  385. 'nerd-fonts' # Iconic font aggregator, collection and patcher
  386. 'noto-fonts-ttf' # Google Noto TTF Fonts
  387. 'noto-fonts-emoji' # Google Noto Emoji Fonts
  388. 'noto-fonts-cjk' # Google Noto CJK Fonts
  389. 'font-awesome' # An iconic font
  390. 'font-hack-ttf' # A typeface designed for source code
  391. 'terminus-font' # Clean, fixed width bitmap font
  392. 'font-iosevka' # Slender monospace sans-serif and slab-serif typeface
  393. )
  394. for PKG in "${PKGS[@]}"; do
  395. echo -e "${green}${bold}[*] START "$PKG" ---${normal}${no_color}"
  396. sudo xbps-install -Sy "$PKG"
  397. echo -e "${magenta}${bold}[+] DONE "$PKG" ---${normal}${no_color}"
  398. echo
  399. sleep 1
  400. done
  401. echo
  402. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  403. echo
  404. }
  405. # -----------------------------------------------------------------------------
  406. # --- 10. COPY CONFIG
  407. # -----------------------------------------------------------------------------
  408. copy_config(){
  409. echo -e "${green}${bold}[*] COPY CONFIG ...${normal}${no_color}"
  410. echo
  411. sleep 1
  412. xdg-user-dirs-update
  413. sleep 1
  414. [ -d "$config_directory"/alacritty ] && mv "$config_directory"/alacritty "$config_directory"/alacritty_$date && echo "alacritty configs detected, backing up."
  415. [ -d "$config_directory"/kitty ] && mv "$config_directory"/kitty "$config_directory"/kitty_$date && echo "alacritty configs detected, backing up."
  416. [ -d "$config_directory"/dunst ] && mv "$config_directory"/dunst "$config_directory"/dunst_$date && echo "dunst configs detected, backing up."
  417. [ -d "$config_directory"/mpd ] && mv "$config_directory"/mpd "$config_directory"/mpd_$date && echo "mpd configs detected, backing up."
  418. [ -d "$config_directory"/ncmpcpp ] && mv "$config_directory"/ncmpcpp "$config_directory"/ncmpcpp_$date && echo "ncmpcpp configs detected, backing up."
  419. [ -d "$config_directory"/ranger ] && mv "$config_directory"/ranger "$config_directory"/ranger_$date && echo "ranger configs detected, backing up."
  420. [ -d "$config_directory"/zathura ] && mv "$config_directory"/zathura "$config_directory"/zathura_$date && echo "zathura configs detected, backing up."
  421. [ -d "$config_directory"/picom ] && mv "$config_directory"/picom "$config_directory"/picom_$date && echo "picom configs detected, backing up."
  422. # [ -e "$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."
  423. sleep 1
  424. cp -r $HOME/.dotfiles/config/* "$config_directory"
  425. # Symlinks Config
  426. ln -s $HOME/.dotfiles/other_config/alias ~/.alias
  427. ln -s $HOME/.dotfiles/other_config/tmux.conf ~/.tmux.conf
  428. ln -s $HOME/.dotfiles/other_config/xinitrc ~/.xinitrc
  429. ln -s $HOME/.dotfiles/other_config/Xresources ~/.Xresources
  430. cp -r $HOME/.dotfiles/other_config/gtkrc-2.0 ~/.gtkrc-2.0
  431. cp -r $HOME/.dotfiles/config/gtk-2.0 ~/.config
  432. cp -r $HOME/.dotfiles/config/gtk-3.0 ~/.config
  433. rm $HOME/.config/alacritty/alacritty.yml
  434. ln -s $HOME/.dotfiles/config/alacritty/alacritty.yml $HOME/.config/alacritty/alacritty.yml
  435. rm $HOME/.config/cava/config
  436. ln -s $HOME/.dotfiles/config/cava/config $HOME/.config/cava/config
  437. rm $HOME/.config/dunst/dunstrc
  438. ln -s $HOME/.dotfiles/config/dunst/dunstrc $HOME/.config/dunst/dunstrc
  439. rm $HOME/.config/kitty/kitty.conf
  440. ln -s $HOME/.dotfiles/config/kitty/kitty.conf $HOME/.config/kitty/kitty.conf
  441. rm $HOME/.config/mpd/mpd.conf
  442. ln -s $HOME/.dotfiles/config/mpd/mpd.conf $HOME/.config/mpd/mpd.conf
  443. rm $HOME/.config/mpv/mpv.conf
  444. ln -s $HOME/.dotfiles/config/mpv/mpv.conf $HOME/.config/mpv/mpv.conf
  445. rm $HOME/.config/ncmpcpp/config
  446. ln -s $HOME/.dotfiles/config/ncmpcpp/config $HOME/.config/ncmpcpp/config
  447. rm $HOME/.config/ranger/rc.conf
  448. ln -s $HOME/.dotfiles/config/ranger/rc.conf $HOME/.config/ranger/rc.conf
  449. rm $HOME/.config/zathura/zathurarc
  450. ln -s $HOME/.dotfiles/config/zathura/zathurarc $HOME/.config/zathura/zathurarc
  451. rm $HOME/.config/picom/picom.conf
  452. ln -s $HOME/.dotfiles/config/picom/picom.conf $HOME/.config/picom/picom.conf
  453. rm $HOME/".config/Code - OSS/User/settings.json"
  454. ln -s $HOME/.dotfiles/config/vscode/settings.json $HOME/".config/Code - OSS/User/settings.json"
  455. echo
  456. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  457. echo
  458. }
  459. # -----------------------------------------------------------------------------
  460. # --- 11. SERVICES & GROUPS
  461. # -----------------------------------------------------------------------------
  462. services_and_groups(){
  463. echo -e "${green}${bold}[*] START SERVICES & GROUPS ...${normal}${no_color}"
  464. echo
  465. sleep 1
  466. # ADD SERVICES ------------------------------------------------------------
  467. sudo ln -s /etc/sv/bluetoothd/ /var/service/
  468. sudo ln -s /etc/sv/NetworkManager/ /var/service/
  469. sudo ln -s /etc/sv/cupsd/ /var/service/
  470. sudo ln -s /etc/sv/dbus /var/service/
  471. sudo ln -s /etc/sv/elogind /var/service/
  472. sudo ln -s /etc/sv/polkitd /var/service/
  473. sudo ln -s /etc/sv/ntpd /var/service/
  474. sudo ln -s /etc/sv/alsa /var/service/
  475. sleep 1
  476. # ADD GROUPS --------------------------------------------------------------
  477. sudo usermod -aG bluetooth $USER
  478. sudo usermod -aG audio $USER
  479. sudo usermod -aG network $USER
  480. sudo usermod -a -G input $USER
  481. sudo usermod -a -G audio $USER
  482. sudo usermod -a -G video $USER
  483. sudo usermod -a -G rfkill $USER
  484. sudo usermod -a -G power $USER
  485. sudo usermod -a -G bluetooth $USER
  486. sudo usermod -a -G pulse-access $USER
  487. sudo usermod -aG libvirt $USER
  488. sudo usermod -aG kvm $USER
  489. sudo usermod -aG socklog $USER
  490. echo
  491. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  492. echo
  493. }
  494. # -----------------------------------------------------------------------------
  495. # --- 12. FINAL
  496. # -----------------------------------------------------------------------------
  497. final(){
  498. echo -e "${green}${bold}[*] COPY CONFIG ...${normal}${no_color}"
  499. echo
  500. sleep 1
  501. # ADD WALLPAPERS ----------------------------------------------------------
  502. cp -r $HOME/.dotfiles/wallpaper $HOME/Pictures/Wallpapers
  503. # ADD ALIASES -------------------------------------------------------------
  504. echo "[ -f ~/.alias ] && source ~/.alias" >> $HOME/.bashrc
  505. sleep 1
  506. # RANGER DEV ICONS --------------------------------------------------------
  507. git clone https://github.com/alexanderjeurissen/ranger_devicons ~/.config/ranger/plugins/ranger_devicons
  508. # UPDATE FONTS CACHE ------------------------------------------------------
  509. fc-cache -fv
  510. echo
  511. echo -e "${magenta}${bold}[+] DONE ----------------------------------------${normal}${no_color}"
  512. echo
  513. }
  514. # -----------------------------------------------------------------------------
  515. # --- 13. REBOOT
  516. # -----------------------------------------------------------------------------
  517. reboot(){
  518. sudo reboot
  519. }
  520. # -----------------------------------------------------------------------------
  521. # --- DIALOG SETTINGS
  522. # -----------------------------------------------------------------------------
  523. 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)
  524. options=(
  525. 1 "SYSTEM UPDATE" off
  526. 2 "INSTALL BASE SYSTEM (CORE, NETWORK, VIDEO, AUDIO, XORG)" off
  527. 3 "INSTALL PKGS" off
  528. 4 "INSTALL DEVELOPMENT PKGS" off
  529. 5 "INSTALL GRAPHICS PKGS" off
  530. 6 "INSTALL PRINTERS & SCANNERS PKGS" off
  531. 7 "INSTALL BLUETOOTH PKGS" off
  532. 8 "INSTALL VIRTUAL MANAGER PKGS" off
  533. 9 "INSTALL FONTS" off
  534. 10 "COPY CONFIG" off
  535. 11 "SERVICES & GROUPS" off
  536. 12 "FINAL" off
  537. 13 "REBOOT" on
  538. )
  539. choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
  540. clear
  541. for choice in $choices
  542. do
  543. case $choice in
  544. 1) system_update ;;
  545. 2) install_base_system ;;
  546. 3) install_pkgs ;;
  547. 4) install_development_pkgs ;;
  548. 5) install_graphics_pkgs ;;
  549. 6) install_printers_and_scanners_pkgs ;;
  550. 7) install_bluetooth_pkgs ;;
  551. 8) install_virtual_manager_pkgs ;;
  552. 9) install_fonts ;;
  553. 10) copy_config ;;
  554. 11) services_and_groups ;;
  555. 12) final ;;
  556. 13) reboot ;;
  557. esac
  558. done
  559. # -----------------------------------------------------------------------------
  560. # Video Redactors
  561. # 'kdenlive' # Non-linear video editor