void-helper.sh 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790
  1. #!/bin/sh
  2. # root check
  3. if [ "$(id -u)" != 0 ]; then
  4. if [ -f /usr/bin/sudo ]; then
  5. echo "$(tput bold)INFO: Using sudo for root operations.$(tput sgr0)"
  6. root="sudo"
  7. elif [ -f /usr/bin/doas ]; then
  8. echo "$(tput bold)INFO: Using doas for root operations.$(tput sgr0)"
  9. root="doas"
  10. fi
  11. fi
  12. # xbps install function
  13. xinstall() {
  14. $root xbps-install "${@}"
  15. }
  16. # Install gum
  17. if ! command -v gum >/dev/null 2>&1; then
  18. echo "I need gum to work! installing..."
  19. xinstall -S gum
  20. fi
  21. # Function for showing messages (green)
  22. show_message() {
  23. gum style --border-foreground="00002" --border="rounded" "${1}"
  24. }
  25. # Function for showing info messages (yellow)
  26. show_info() {
  27. gum style --border-foreground="00003" --border="rounded" "${1}"
  28. }
  29. # Function for asking (Choosen by default) (green)
  30. show_prompt() {
  31. gum confirm --prompt.foreground="00002" --selected.background="00002" "${1}"
  32. }
  33. # Function for asking (Not choosen by default) (green)
  34. show_prompt_no() {
  35. gum confirm --prompt.foreground="00002" --selected.background="00002" --default=0 "${1}"
  36. }
  37. # Functions to show menus (green)
  38. gum_choose() {
  39. header1="$1"
  40. shift
  41. gum choose --ordered --cursor.foreground="00002" --header.foreground="00002" --selected.foreground="00002" --header="${header1}" "${@}"
  42. }
  43. # variables
  44. progname="Void Helper"
  45. version="2.0.0"
  46. # show header
  47. show_message "$progname $version"
  48. echo "Author: oSoWoSo (https://codeberg.org/oSoWoSo)"
  49. echo "Contributor: Raven (https://codeberg.org/jh1r)"
  50. echo 'under GPLv3 License'
  51. xbps-query -v --version | sed 's/GIT: UNSET//'
  52. gum --version
  53. # Install recommended packages
  54. show_prompt "Installing recommended packages?" && recommended="yes"
  55. # Install development packages
  56. show_prompt_no "Do you want to install packages needed for developing software?" && development="yes"
  57. # Enable non-free repository
  58. non_free() {
  59. show_prompt "Do you want to install latest NVIDIA proprietary drivers?" && \
  60. test "$(xbps-query -l | grep xf86-video-nouveau)" -eq 0 && \
  61. $root xbps-remove xf86-video-nouveau && \
  62. xinstall -y nvidia
  63. }
  64. show_prompt_no "Do you want to enable the non-free repository?" && nonfree="yes"
  65. # Install shell
  66. show_info "Choosing a system shell"
  67. shell=$(gum_choose "Which shell do you want to use as default?" "Bash" "Fish" "ZSH")
  68. # Install a terminal text editor
  69. show_info "Choosing a terminal text editor"
  70. editor=$(gum_choose "Which terminal text editor do you want to install?" "Helix" "Emacs" "Micro" "Vim" "Neovim" "Joe" "Nano" "None")
  71. # Configure audio
  72. show_info "Choosing Audio"
  73. audio=$(gum_choose "Which audio software do you want to install?" "Pipewire" "ALSA" "PulseAudio" "None")
  74. # Configure network management
  75. show_info "Choosing network management"
  76. netmngmt=$(gum_choose "Which network management software do you want to install?" "Network Manager" "dhcpcd + wpa_supplicant" "dhcpcd + IWD" "Connman" "None")
  77. # Configure Bluetooth
  78. show_prompt_no "Do you want to configure Bluetooth?" && bluetooth="yes"
  79. # Configure Printing
  80. printers() {
  81. show_prompt_no "Do you have a HP printer?" && \
  82. show_message "Installing HPLIP" && \
  83. xinstall -y hplip
  84. show_prompt_no "Do you have a Samsung or Xerox printer?" && \
  85. show_message "Installing Splix" && \
  86. xinstall -y splix
  87. }
  88. show_prompt_no "Do you want to install software needed for printing?" && printing="yes"
  89. # Configure Notebook Power Saving
  90. show_prompt_no "Do you use Void Linux on a notebook?" && notebook="yes"
  91. # Configure NFS for sharing files
  92. show_prompt "Do you want to install NFS for file sharing?" && sharing="yes"
  93. # Install AM AppImage manager
  94. show_prompt "Do you want to install AM AppImage package manager and dependencies?" && appimages="yes"
  95. # Configure a graphical environment
  96. gui_part() {
  97. xkb=$(gum_choose "Which default language do you want to set?" "English US" "German" "English UK" "French" "Italian" "Swedish" "Norwegian" "Czech")
  98. # Install a desktop environment
  99. show_prompt_no "Do you want to install a desktop environment?" && \
  100. desktop=$(gum_choose "Which desktop do you want to install?" "Budgie" "Cinnamon" "GNOME" "KDE Plasma" "LXQt" "MATE" "Xfce" "Enlightenment" "Lumina" "None")
  101. # Install a window manager
  102. show_prompt "Do you want to install a window manager?" && \
  103. windowmanager=$(gum_choose "Do you want to install a window manager?" "Awesome" "i3wm" "Openbox" "Fluxbox" "Bspwm" "Herbstluftwm" "IceWM" "JWM" "DWM" "Qtile" "FVWM3" "Sway [wayland]" "Wayfire [wayland]" "Hyprland [wayland]" "None")
  104. # Install Display Manager
  105. show_info "Choosing a Display Manager"
  106. displaymanager=$(gum_choose "Which display manager do you want to install?" "LightDM" "Emptty" "Slim" "SDDM" "GDM" "None")
  107. # Install Flatpak
  108. show_prompt_no "Do you want to install Flatpak?" && flatpak="yes"
  109. # Install a terminal emulator
  110. show_info "Choosing a terminal emulator"
  111. terminal=$(gum_choose "Which terminal emulator do you want to install?" "Kitty" "Alacritty" "XTerm" "LXTerminal" "Yakuake" "Sakura" "None")
  112. # Install a web browser
  113. show_info "Choosing a web browser"
  114. browser=$(gum_choose "Which web browser do you want to install?" "Firefox" "Firefox ESR" "Chromium" "qutebrowser" "Falkon" "Epiphany" "Badwolf" "None")
  115. # Install a media player
  116. show_info "Choosing a media player"
  117. mediaplayer=$(gum_choose "Which media player do you want install?" "mpv" "VLC" "Parole [Xfce]" "Totem [Gnome]" "Dragon Player [KDE]" "None")
  118. # Install an office suite
  119. show_info "Choosing an office suite"
  120. officesuite=$(gum_choose "Which office suite do you want to install?" "LibreOffice [GTK]" "LibreOffice [Qt]" "OnlyOffice [flatpak]" "None")
  121. # Install graphic design programs
  122. show_info "Choosing graphic design programs"
  123. graphic=$(gum_choose "Which graphic design programs do you want to install?" "GIMP" "Inkscape" "Krita" "GIMP + Inkscape" "Krita + Inkscape" "None")
  124. # Install container or virtual machine programs
  125. show_info "Choosing container or virtual machine programs"
  126. virtcnt=$(gum_choose "Which container or virtual machine program do you want to install?" "QEMU + Quickemu" "QEMU + Virt Manager" "QEMU [no GUI]" "Docker" "Kubernetes" "Docker + Kubernetes" "Linux Containers [LXC/LXD]" "None")
  127. # Install a backup program
  128. show_info "Choosing a backup program"
  129. backup=$(gum_choose "Which backup program do you want to install?" "Borg Backup" "Timeshift" "Deja-dup" "None")
  130. # Install a graphical text editor
  131. show_info "Choosing a graphical text editor"
  132. geditor=$(gum_choose "Which graphical text editor do you want to install?" "Geany" "Gedit" "Kate" "LeafPad" "Mousepad" "Code-OSS" "Notepadqq" "Bluefish" "Emacs gtk3" "Emacs x11" "Qemacs" "Vile" "Zile" "GVim" "Kakoune" "None")
  133. }
  134. show_prompt "Do you want to configure a graphical environment?" && guipart="yes" && gui_part
  135. show_prompt "Install everything?" && show_info "Installing..." || exit 0
  136. # Do installation itself
  137. show_message "Trying to update xbps first"
  138. xinstall -Suy xbps
  139. show_message "Updating system"
  140. xinstall -uy
  141. case $recommended in
  142. yes )
  143. show_message "Installing recommended"
  144. xinstall -y smartmontools zstd xz bzip2 lz4 zip unzip man-db file;;
  145. esac
  146. case $development in
  147. yes )
  148. show_message "Installing development"
  149. xinstall -y autoconf automake bison m4 make libtool meson ninja optipng sassc;;
  150. esac
  151. case $nonfree in
  152. yes )
  153. show_message "Installing void nonfree"
  154. xinstall -y void-repo-nonfree && non_free;;
  155. esac
  156. case $shell in
  157. Fish )
  158. show_message "Installing Fish"
  159. xinstall -y fish-shell
  160. $root usermod -s /usr/bin/fish "$(id -un)";;
  161. ZSH )
  162. show_message "Installing ZSH"
  163. xinstall -y zsh zsh-autosuggestions zsh-syntax-highlighting
  164. $root usermod -s /usr/bin/zsh "$(id -un)";;
  165. Bash)
  166. show_message "Installing Bash"
  167. xinstall -y bash-completion
  168. $root usermod -s /usr/bin/bash "$(id -un)";;
  169. esac
  170. case $editor in
  171. Emacs )
  172. show_message "Installing Emacs NOX"
  173. xinstall -y emacs;;
  174. Micro )
  175. show_message "Installing Micro"
  176. xinstall -y micro;;
  177. Vim )
  178. show_message "Installing Vim"
  179. xinstall -y vim;;
  180. Neovim)
  181. show_message "Installing Neovim"
  182. xinstall -y neovim;;
  183. Joe )
  184. show_message "Installing Joe"
  185. xinstall -y joe;;
  186. Helix )
  187. show_message "Installing Helix"
  188. xinstall -y helix;;
  189. Nano )
  190. show_message "Installing Nano"
  191. xinstall -y nano;;
  192. None ) ;;
  193. esac
  194. case $audio in
  195. ALSA )
  196. show_message "Installing ALSA"
  197. xinstall -y alsa-utils apulse
  198. $root usermod -aG audio "$(id -un)";;
  199. PulseAudio )
  200. show_message "Installing PulseAudio"
  201. xinstall -y pulseaudio pulseaudio-utils pamixer alsa-plugins-pulseaudio
  202. $root usermod -aG audio "$(id -un)";;
  203. Pipewire )
  204. show_message "Installing PipeWire"
  205. xinstall -y pipewire wireplumber libspa-bluetooth
  206. $root mkdir -p /etc/pipewire/pipewire.conf.d
  207. $root ln -s /usr/share/examples/wireplumber/10-wireplumber.conf /etc/pipewire/pipewire.conf.d/
  208. $root ln -s /usr/share/examples/pipewire/20-pipewire-pulse.conf /etc/pipewire/pipewire.conf.d/;;
  209. None ) ;;
  210. esac
  211. case $netmngmt in
  212. "Network Manager" )
  213. show_message "Installing Network Manager"
  214. xinstall -y NetworkManager;;
  215. "dhcpcd + wpa_supplicant" )
  216. show_message "Installing dhcpcd + wpa_supplicant"
  217. xinstall -y dhcpcd wpa_supplicant;;
  218. "dhcpcd + IWD" )
  219. show_message "Installing dhcpcd + IWD"
  220. xinstall -y dhcpcd iwd;;
  221. Connman )
  222. show_message "Installing Connman"
  223. xinstall -y connman;;
  224. None ) ;;
  225. esac
  226. case $bluetooth in
  227. yes )
  228. show_message "Installing Bluez"
  229. xinstall -y bluez
  230. $root usermod -aG bluetooth "$(id -un)"
  231. show_prompt "Do you want to manage Bluetooth devices graphically?" && \
  232. show_message "Installing Blueman" && xinstall -y blueman;;
  233. esac
  234. case $printing in
  235. yes )
  236. show_message "Installing CUPS"
  237. xinstall -y cups cups-pk-helper cups-pdf cups-filters
  238. $root usermod -aG lpadmin "$(id -un)"
  239. printers;;
  240. esac
  241. case $notebook in
  242. yes )
  243. show_message "Installing TLP for power saving"
  244. xinstall -y tlp;;
  245. esac
  246. case $sharing in
  247. yes )
  248. show_message "Installing NFS support"
  249. xinstall nfs-utils sv-netmount;;
  250. esac
  251. case $appimages in
  252. yes )
  253. show_message "Installing AM"
  254. cd /tmp || exit
  255. curl -s "https://raw.githubusercontent.com/ivan-hc/AM/main/INSTALL" -o INSTALL
  256. chmod +x INSTALL
  257. $root ./INSTALL;;
  258. esac
  259. case $guipart in
  260. yes )
  261. show_message "Installing Xorg"
  262. xinstall -y xorg-minimal mesa-dri;;
  263. esac
  264. xkb_part() {
  265. lang="$1"
  266. cat <<EOF > /tmp/00-keyboard.conf
  267. Section "InputClass"
  268. Identifier "keyboard"
  269. Option "XkbLayout" "$lang"
  270. EndSection
  271. EOF
  272. $root mkdir -p /etc/X11/xorg.conf.d
  273. $root mv /tmp/00-keyboard.conf /etc/X11/xorg.conf.d/
  274. }
  275. case $xkb in
  276. German )
  277. xkb_part "de";;
  278. "English US" )
  279. xkb_part "us";;
  280. "English UK" )
  281. xkb_part "gb";;
  282. French )
  283. xkb_part "fr";;
  284. Italian )
  285. xkb_part "it";;
  286. Swedish )
  287. xkb_part "se";;
  288. Norwegian )
  289. xkb_part "no";;
  290. Czech )
  291. xkb_part "cz";;
  292. esac
  293. case $desktop in
  294. Xfce )
  295. show_message "Installing Xfce"
  296. xinstall -y xfce4-appfinder xfce4-battery-plugin xfce4-clipman-plugin xfce4-cpufreq-plugin \
  297. xfce4-cpugraph-plugin xfce4-dict xfce4-diskperf-plugin xfce4-fsguard-plugin xfce4-genmon-plugin \
  298. xfce4-notifyd xfce4-panel xfce4-panel-appmenu xfce4-places-plugin xfce4-power-manager \
  299. xfce4-pulseaudio-plugin xfce4-screensaver xfce4-screenshooter xfce4-session xfce4-settings \
  300. xfce4-taskmanager xfce4-terminal xfce4-whiskermenu-plugin xfce4-xkb-plugin Thunar thunar-volman \
  301. thunar-archive-plugin thunar-media-tags-plugin ristretto xarchiver mousepad xfwm4 xfdesktop \
  302. zathura zathura-pdf-poppler gvfs gvfs-mtp gvfs-gphoto2 xfce-polkit parole lightdm \
  303. lightdm-gtk3-greeter;;
  304. MATE )
  305. show_message "Installing MATE"
  306. xinstall -y mate-applets mate-backgrounds mate-calc mate-control-center mate-desktop \
  307. mate-icon-theme mate-indicator-applet mate-media mate-menus mate-notification-daemon \
  308. mate-panel mate-panel-appmenu mate-screensaver mate-session-manager mate-settings-daemon \
  309. mate-system-monitor mate-terminal mate-themes mate-tweak mate-utils mozo pluma caja \
  310. caja-image-converter caja-sendto caja-wallpaper caja-xattr-tags eom atril gvfs gvfs-mtp \
  311. gvfs-gphoto2 engrampa mate-power-manager mate-polkit lightdm lightdm-gtk3-greeter;;
  312. GNOME )
  313. show_message "Installing GNOME"
  314. xinstall -y gnome-backgrounds gnome-calculator gnome-calendar gnome-characters \
  315. gnome-console gnome-control-center gnome-disk-utility gnome-screenshot gnome-session \
  316. gnome-shell gnome-system-monitor gnome-video-effects nautilus nautilus-sendto sushi gdm \
  317. evince eog eog-plugins gnome-text-editor;;
  318. "KDE Plasma" )
  319. show_message "Installing KDE Plasma"
  320. xinstall -y plasma-desktop plasma-disks plasma-firewall plasma-nm plasma-pa \
  321. plasma-systemmonitor plasma-thunderbolt plasma-wayland-protocols bluedevil breeze-gtk \
  322. dolphin gwenview okular ark kde-gtk-config5 kdegraphics-thumbnailers kdeplasma-addons5 \
  323. kgamma5 khelpcenter kinfocenter konsole kscreen kwalletmanager spectacle sddm-kcm sddm;;
  324. Budgie )
  325. show_message "Installing Budgie"
  326. xinstall -y budgie-desktop budgie-control-center budgie-desktop-view \
  327. budgie-screensaver gnome-backgrounds gnome-terminal nautilus nautilus-sendto sushi \
  328. lightdm lightdm-gtk3-greeter gnome-system-monitor gnome-calculator gnome-calendar \
  329. gnome-characters gnome-disk-utility gedit gedit-plugins eog eog-plugins evince;;
  330. Cinnamon )
  331. show_message "Installing Cinnamon"
  332. xinstall -y cinnamon nemo nemo-compare nemo-fileroller nemo-image-converter \
  333. nemo-preview gnome-system-monitor gnome-terminal gnome-screenshot gnome-disk-utility \
  334. gnome-keyring evince gvfs gvfs-mtp gvfs-gphoto2 file-roller gedit gedit-plugins \
  335. eog eog-plugins lightdm lightdm-gtk3-greeter;;
  336. LXQt )
  337. show_message "Installing LXQt"
  338. xinstall -y lxqt-about lxqt-admin lxqt-archiver lxqt-build-tools lxqt-config \
  339. lxqt-globalkeys lxqt-openssh-askpass lxqt-panel lxqt-policykit lxqt-powermanagement \
  340. lxqt-qtplugin lxqt-runner lxqt-session lxqt-sudo lxqt-themes obconf-qt openbox \
  341. pcmanfm-qt lximage-qt FeatherPad qlipper qterminal lxqt-notificationd sddm;;
  342. Lumina )
  343. show_message "Installing Lumina"
  344. xinstall -y lumina;;
  345. Enlightenment )
  346. show_message "Installing Enlightenment"
  347. xinstall -y enlightenment;;
  348. None ) ;;
  349. esac
  350. case $windowmanager in
  351. i3wm )
  352. show_message "Installing i3wm"
  353. xinstall -y i3 i3lock i3status dunst dmenu feh Thunar thunar-volman viewnior \
  354. thunar-archive-plugin thunar-media-tags-plugin xarchiver lm_sensors acpi \
  355. playerctl scrot htop arandr gvfs gvfs-mtp gvfs-gphoto2 xfce4-taskmanager;;
  356. Openbox )
  357. show_message "Installing Openbox"
  358. xinstall -y openbox obconf lxappearance dunst feh arandr pcmanfm gvfs \
  359. gvfs-mtp gvfs-gphoto2 lxtask scrot htop xarchiver viewnior;;
  360. Fluxbox )
  361. show_message "Installing Fluxbox"
  362. xinstall -y fluxbox dunst feh arandr Thunar thunar-volman \
  363. thunar-archive-plugin thunar-media-tags-plugin gvfs gvfs-mtp gvfs-gphoto2 \
  364. scrot htop xarchiver viewnior;;
  365. Bspwm )
  366. show_message "Installing Bspwm"
  367. xinstall -y bspwm sxhkd dunst feh dmenu arandr Thunar thunar-volman \
  368. thunar-archive-plugin thunar-media-tags-plugin gvfs gvfs-mtp gvfs-gphoto2 \
  369. scrot htop xarchiver viewnior;;
  370. Herbstluftwm )
  371. show_message "Installing Herbstluftwm"
  372. xinstall -y herbstluftwm dunst feh dmenu arandr Thunar thunar-volman \
  373. thunar-archive-plugin thunar-media-tags-plugin gvfs gvfs-mtp gvfs-gphoto2 \
  374. scrot htop xarchiver viewnior;;
  375. IceWM )
  376. show_message "Installing IceWM"
  377. xinstall -y icewm dunst feh dmenu arandr Thunar thunar-volman \
  378. thunar-archive-plugin thunar-media-tags-plugin gvfs gvfs-mtp gvfs-gphoto2 \
  379. scrot htop xarchiver viewnior;;
  380. Awesome )
  381. show_message "Installing Awesome"
  382. xinstall -y awesome vicious dunst feh arandr Thunar thunar-volman \
  383. thunar-archive-plugin thunar-media-tags-plugin gvfs gvfs-mtp gvfs-gphoto2 \
  384. scrot htop xarchiver viewnior;;
  385. JWM )
  386. show_message "Installing JWM"
  387. xinstall -y jwm dunst feh dmenu arandr Thunar thunar-volman \
  388. thunar-archive-plugin thunar-media-tags-plugin gvfs gvfs-mtp gvfs-gphoto2 \
  389. scrot htop xarchiver viewnior;;
  390. DWM )
  391. show_message "Installing DWM"
  392. xinstall -y dwm dunst feh dmenu arandr Thunar thunar-volman \
  393. thunar-archive-plugin thunar-media-tags-plugin gvfs gvfs-mtp gvfs-gphoto2 \
  394. scrot htop xarchiver viewnior;;
  395. Qtile )
  396. show_message "Installing Qtile"
  397. xinstall -y python3 python3-pip python3-setuptools python3-wheel \
  398. python3-virtualenv-clone python3-dbus python3-gobject pango pango-devel \
  399. libffi-devel xcb-util-cursor gdk-pixbuf feh arandr Thunar thunar-volman \
  400. thunar-media-tags-plugin gvfs gvfs-mtp gvfs-gphoto2 scrot htop xarchiver \
  401. thunar-archive-plugin viewnior
  402. pip install qtile;;
  403. FVWM3 )
  404. how_message "Installing FVWM3"
  405. xinstall -y fvwm3 feh xfce4-terminal arandr Thunar thunar-volman gvfs htop \
  406. thunar-archive-plugin thunar-media-tags-plugin gvfs gvfs-mtp gvfs-gphoto2 \
  407. mousepad scrot htop xarchiver viewnior;;
  408. "Sway [wayland]" )
  409. show_message "Installing Sway"
  410. xinstall -y sway swaybg swayidle swaylock azote grimshot \
  411. Waybar gvfs gvfs-mtp gvfs-gphoto2 htop wofi wayclip;;
  412. "Wayfire [wayland]" )
  413. show_message "Installing Wayfire"
  414. xinstall -y wayfire grim gvfs gvfs-mtp gvfs-gphoto2 htop wofi \
  415. azote wayclip shotman;;
  416. "Hyprland [wayland]" )
  417. show_message "Installing Hyprland"
  418. echo 'repository=https://github.com/Makrennel/hyprland-void/tree/repository-x86_64-glibc' > /tmp/hyprland-repo.conf
  419. $root mv /tmp/hyprland-repo.conf /etc/xbps.d/
  420. xi hyprland;;
  421. None) ;;
  422. esac
  423. case $displaymanager in
  424. LightDM )
  425. show_message "Installing LightDM"
  426. xinstall -y lightdm lightdm-gtk3-greeter lightdm-gtk-greeter-settings;;
  427. Emptty )
  428. show_message "Installing Emptty"
  429. xinstall -y emptty;;
  430. Slim )
  431. show_message "Installing Slim"
  432. xinstall -y slim slim-void-theme;;
  433. SDDM )
  434. show_message "Installing SDDM"
  435. xinstall -y sddm;;
  436. GDM )
  437. show_message "Installing GDM"
  438. xinstall -y gdm gdm settings;;
  439. None ) ;;
  440. esac
  441. case $flatpak in
  442. yes )
  443. show_message "Installing Flatpak"
  444. xinstall -y flatpak;;
  445. esac
  446. case $terminal in
  447. Alacritty )
  448. show_message "Installing Alacritty"
  449. xinstall -y alacritty alacritty-terminfo;;
  450. XTerm )
  451. show_message "Installing XTerm"
  452. xinstall -y xterm;;
  453. LXTerminal )
  454. show_message "Installing LXTerminal"
  455. xinstall -y lxterminal;;
  456. Yakuake )
  457. show_message "Installing Yakuake"
  458. xinstall -y yakuake;;
  459. Sakura )
  460. show_message "Installing Sakura"
  461. xinstall -y sakura;;
  462. Kitty )
  463. show_message "Installing Kitty"
  464. xinstall -y kitty kitty-terminfo;;
  465. None ) ;;
  466. esac
  467. case $browser in
  468. Firefox )
  469. show_message "Installing Firefox"
  470. xinstall -y firefox firefox-i18n-en-US firefox-i18n-de;;
  471. "Firefox ESR" )
  472. show_message "Installing Firefox ESR"
  473. xinstall -y firefox-esr firefox-esr-i18n-en-US firefox-esr-i18n-de;;
  474. Chromium )
  475. show_message "Installing Chromium"
  476. xinstall -y chromium;;
  477. qutebrowser )
  478. show_message "Installing Qutebrowser"
  479. xinstall -y qutebrowser;;
  480. Falkon )
  481. show_message "Installing Falkon"
  482. xinstall -y falkon;;
  483. Epiphany )
  484. show_message "Installing Epiphany"
  485. xinstall -y epiphany;;
  486. Badwolf )
  487. show_message "Installing Badwolf"
  488. xinstall -y badwolf;;
  489. None ) ;;
  490. esac
  491. case $mediaplayer in
  492. mpv )
  493. show_message "Installing mpv"
  494. xinstall -y mpv;;
  495. VLC )
  496. show_message "Installing VLC Media Player"
  497. xinstall -y vlc;;
  498. "Parole [Xfce]" )
  499. show_message "Installing Parole"
  500. xinstall -y parole;;
  501. "Totem [Gnome]" )
  502. show_message "Installing Totem"
  503. xinstall -y totem;;
  504. "Dragon Player [KDE]" )
  505. show_message "Installing Dragon Player"
  506. xinstall -y dragon-player;;
  507. None ) ;;
  508. esac
  509. case $officesuite in
  510. "LibreOffice [GTK]" )
  511. show_message "Installing LibreOffice (GTK)"
  512. xinstall -y libreoffice-writer libreoffice-calc libreoffice-impress \
  513. libreoffice-draw libreoffice-gnome;;
  514. "LibreOffice [Qt]" )
  515. show_message "Installing LibreOffice (Qt)"
  516. xinstall -y libreoffice-writer libreoffice-calc libreoffice-impress \
  517. libreoffice-draw libreoffice-kde;;
  518. "OnlyOffice [flatpak]" )
  519. show_message "Installing OnlyOffice"
  520. $root flatpak install org.onlyoffice.desktopeditors;;
  521. esac
  522. case $graphic in
  523. GIMP )
  524. show_message "Installing GIMP"
  525. xinstall -y gimp;;
  526. Inkscape )
  527. show_message "Installing Inkscape"
  528. xinstall -y inkscape;;
  529. Krita )
  530. show_message "Installing Krita"
  531. xinstall -y krita;;
  532. "GIMP + Inkscape" )
  533. show_message "Installing GIMP and Inkscape"
  534. xinstall -y gimp inkscape;;
  535. "Krita + Inkscape" )
  536. show_message "Installing Krita + Inkscape"
  537. xinstall -y krita inkscape;;
  538. None ) ;;
  539. esac
  540. case $virtcnt in
  541. "QEMU + Virt Manager" )
  542. show_message "Installing QEMU + Virt Manager"
  543. xinstall -y qemu libvirt virt-manager virt-manager-tools;;
  544. "QEMU + Quickemu" )
  545. show_message "Installing QEMU + Quickemu"
  546. xinstall -y qemu gawk grep glxinfo jq pciutils procps-ng python3 cdrtools usbutils util-linux sed socat spicy swtpm xdg-user-dirs xrandr zsync unzip
  547. curl -s "https://raw.githubusercontent.com/quickemu-project/quickemu/refs/heads/master/quickget" > /tmp/quickget
  548. curl -s "https://raw.githubusercontent.com/quickemu-project/quickemu/refs/heads/master/quickemu" > /tmp/quickemu
  549. curl -s "https://raw.githubusercontent.com/quickemu-project/quickemu/refs/heads/master/chunkcheck" > /tmp/chunkcheck
  550. curl -s "https://raw.githubusercontent.com/quickemu-project/quickemu/refs/heads/master/quickreport" > /tmp/quickreport
  551. $root mkdir -p /opt/quickemu
  552. cd /tmp/ || exit
  553. $root mv quickget /opt/quickemu/quickget
  554. $root mv quickemu /opt/quickemu/quickemu
  555. $root mv chunkcheck /opt/quickemu/chunkcheck
  556. $root mv quickreport /opt/quickemu/quickreport
  557. cd /opt/quickemu/ && $root chmod a+x quickget quickemu chunkcheck quickreport;;
  558. "QEMU [no GUI]" )
  559. show_message "Installing QEMU (without GUI)"
  560. xinstall -y qemu libvirt;;
  561. Docker )
  562. show_message "Installing Docker"
  563. xinstall -y docker docker-cli;;
  564. Kubernetes )
  565. show_message "Installing Kubernetes"
  566. xinstall -y kubernetes;;
  567. "Docker + Kubernetes" )
  568. show_message "Installing Docker and Kubernetes"
  569. xinstall -y docker docker-cli kubernetes;;
  570. "Linux Containers [LXC/LXD]" )
  571. show_message "Installing Linux Containers (LXC/LXD)"
  572. xinstall -y lxc lxd;;
  573. None ) ;;
  574. esac
  575. case $backup in
  576. "Borg Backup" )
  577. show_message "Installing Borg Backup"
  578. xinstall -y borg;;
  579. Timeshift )
  580. show_message "Installing Timeshift"
  581. xinstall -y timeshift;;
  582. Deja-dup )
  583. show_message "Installing Deja-dup"
  584. xinstall -y deja-dup;;
  585. None ) ;;
  586. esac
  587. case $geditor in
  588. Geany )
  589. show_message "Installing Geany"
  590. xinstall -y geany geany-plugins geany-plugins-extra;;
  591. Gedit )
  592. show_message "Installing Gedit"
  593. xinstall -y gedit gedit-plugins;;
  594. Kate )
  595. show_message "Installing Kate"
  596. xinstall -y kate5;;
  597. LeafPad )
  598. show_message "Installing LeafPad"
  599. xinstall -y leafpad;;
  600. Mousepad )
  601. show_message "Installing Mousepad"
  602. xinstall -y mousepad;;
  603. Code-OSS )
  604. show_message "Installing VSCodium"
  605. xinstall -y vscode;;
  606. Notepadqq )
  607. show_message "Installing Notepadqq"
  608. xinstall -y notepadqq;;
  609. Bluefish )
  610. show_message "Installing Bluefish"
  611. xinstall -y bluefish;;
  612. "Emacs gtk3" )
  613. show_message "Installing the GTK3 version of Emacs"
  614. xinstall -y emacs-gtk3;;
  615. "Emacs x11" )
  616. show_message "Installing the X11 version of Emacs"
  617. xinstall -y emacs-x11;;
  618. Qemacs )
  619. show_message "Installing QEmacs"
  620. xinstall -y qemacs;;
  621. Vile )
  622. show_message "Installing Vile"
  623. xinstall -y vile;;
  624. Zile )
  625. show_message "Installing Zile"
  626. xinstall -y zile;;
  627. GVim )
  628. show_message "Installing GVim"
  629. xinstall -y gvim;;
  630. Kakoune )
  631. show_message "Installing Kakoune"
  632. xinstall -y kakoune;;
  633. None ) ;;
  634. esac
  635. # Enable or disable services
  636. manage_services() {
  637. services=$(gum_choose "Which service you want to autostart?" --height=23 --no-limit $(diff -r /etc/sv/ /var/service/ | grep "etc/sv" | cut -d' ' -f4))
  638. for service in $services; do
  639. show_message "Enabling ${service} service"
  640. $root ln -sv "/etc/sv/${service}" /var/service/
  641. done
  642. removeServices=$(gum_choose "Which service you want to REMOVE?" --height=23 --no-limit $(ls /var/service/))
  643. for service in $removeServices; do
  644. show_message "Disabling ${service} service"
  645. $root rm "/var/service/${service}"
  646. done
  647. }
  648. show_prompt "Manage services?" && manage_services
  649. show_message "CONFIGURATION FINISHED. ENJOY VOID LINUX :)
  650. PS: If you spotted any bug, please contact me to get things right"