void 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/bin/bash
  2. # while-menu-dialog: a menu driven system information program
  3. DIALOG_CANCEL=1
  4. DIALOG_ESC=255
  5. HEIGHT=0
  6. WIDTH=0
  7. display_result() {
  8. dialog --title "$1" \
  9. --no-collapse \
  10. --msgbox "$result" 0 0
  11. }
  12. while true; do
  13. exec 3>&1
  14. selection=$(dialog \
  15. --backtitle "Void installer v1.1" \
  16. --title "Menu" \
  17. --clear \
  18. --cancel-label "Exit" \
  19. --menu "Please select:" $HEIGHT $WIDTH 4 \
  20. "1" "Inspect" \
  21. "2" "Update" \
  22. "3" "Install" \
  23. 2>&1 1>&3)
  24. exit_status=$?
  25. exec 3>&-
  26. case $exit_status in
  27. $DIALOG_CANCEL)
  28. clear
  29. echo "Program terminated."
  30. exit
  31. ;;
  32. $DIALOG_ESC)
  33. clear
  34. echo "Program aborted." >&2
  35. exit 1
  36. ;;
  37. esac
  38. case $selection in
  39. 1 )
  40. vim void
  41. ;;
  42. 2 )
  43. sudo xbps-install -Syu
  44. ;;
  45. 3 )
  46. sudo xbps-install abiword abook acpi apulse alsa-plugins-pulseaudio alsa-tools alsa-utils arc-theme bash-completion bc btop ca-certificates calcurse cargo cmus cups cups-browsed curl dunst dvtm epson-inkjet-printer-escpr ethtool feh firefox flashrom fluxbox font-hack-ttf geary gettext github-cli gnumeric gufw htop inxi isync jgmenu lxappearance mpv msmtp NetworkManager network-manager-applet neomutt nerd-fonts-symbols-ttf neofetch nextcloud-client nyxt octoxbps papirus-icon-theme pass pcmanfm polkit pcsc-ccid pcsc-tool pcsclite spython3-pip ranger redshift redshift-gtk rofi rust scribus scrot slim smartmontools sxhkd thunderbird tlp tlp-rdw transset ueberzug ufw unzip usbutils util-linux vifm vim volumeicon wget xautolock xcompmgr xdg-user-dirs xdg-user-dirs-gtk xdg-utils xf86-input-synaptics xcalc xinit xorg xorg-server xterm zathura zathura-pdf-poppler zsh
  47. ;;
  48. esac
  49. done