1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #!/bin/bash
- # while-menu-dialog: a menu driven system information program
- DIALOG_CANCEL=1
- DIALOG_ESC=255
- HEIGHT=0
- WIDTH=0
- display_result() {
- dialog --title "$1" \
- --no-collapse \
- --msgbox "$result" 0 0
- }
- while true; do
- exec 3>&1
- selection=$(dialog \
- --backtitle "Gentoo installer v1.1" \
- --title "Menu" \
- --clear \
- --cancel-label "Exit" \
- --menu "Please select:" $HEIGHT $WIDTH 4 \
- "1" "Inspect" \
- "2" "Install" \
- 2>&1 1>&3)
- exit_status=$?
- exec 3>&-
- case $exit_status in
- $DIALOG_CANCEL)
- clear
- echo "Program terminated."
- exit
- ;;
- $DIALOG_ESC)
- clear
- echo "Program aborted." >&2
- exit 1
- ;;
- esac
- case $selection in
- 1 )
- vim gentoo
- ;;
- 2 )
- sudo emerge -avg abiword abook acpi alsa-tools alsa-utils arc-theme bash-completion sys-devel/bc btop cmus calcurse cpuid2cpuflags curl dunst ethtool feh firefox flashrom flatpak galculator gentoolkit gnumeric htop hw-probe inxi lxappearance lxappearance-obconf menumaker mpv ncspot neofetch nextcloud-client obconf openbox papirus-icon-theme pcmanfm picom dev-python/pip pulseaudio ranger redshift resolve-march-native rofi dev-lang/rust scribus scrot x11-misc/slim smartmontools sxhkd thunderbird tint2 tlp udiskie ueberzug ufw unzip usbutils vifm vim wget xdg-user-dirs xdg-user-dirs-gtk xdg-utils xf86-input-synaptics xinit xorg-server xterm yubioath-flutter-bin zathura-pdf-poppler --autounmask-write --autounmask
- ;;
- esac
- done
|