Use less custom buttons for yesno dialogs
This commit is contained in:
parent
d6a53203ab
commit
5c8bd58dfc
@ -25,8 +25,8 @@ _NoNetwork="\nThis installer needs to be run with an active internet connection
|
||||
# Preparation Menu
|
||||
_PrepTitle="Prep for Install"
|
||||
_PrepBody="\nThis is the menu in which you will prepare your system for the install.\n\nTo begin the install you must first have:\n\n - A root (/) partition mounted (UEFI systems also require a seperate boot partition).\n - A user created and the passwords set.\n - The system settings configured."
|
||||
_PrepLayout="Select keyboard layout"
|
||||
_PrepShowDev="Show device tree (optional)"
|
||||
_PrepLayout="Keyboard Layout"
|
||||
_PrepShowDev="Show lsblk output (optional)"
|
||||
_PrepParts="Edit partitions (optional)"
|
||||
_PrepLUKS="LUKS encryption (optional)"
|
||||
_PrepLVM="Logical volume management (optional)"
|
||||
@ -79,7 +79,7 @@ _WMLoginBody="\nSelect which to use as your primary login session.\n\nThis can b
|
||||
# Set keymap, hwclock, local and timezone
|
||||
_CMapTitle="Console Keymap"
|
||||
_CMapBody="\nSelect console keymap, the console is the tty shell you reach before starting a graphical environment (usually Xorg).\n\nIts keymap is seperate from the one used by the graphical environments, though many do use the same such as 'us' English.\n\nDefault: us"
|
||||
_XMapBody="\nPick your system keymap from the list below\n\nThis keymap layout is used once a graphical environment is running (usually Xorg).\n\nIf a matching console keymap exists it will be used, otherwise you will be asked to select one for that as well.\n\nDefault: us"
|
||||
_XMapBody="\nPick your system keymap from the list below\n\nThis is the keymap used once a graphical environment is running (usually Xorg). If a matching console keymap exists it will be used, otherwise you will be asked to select one for that as well.\n\nDefault: us"
|
||||
_LocaleBody="\nLocale determines the system language and currency formats.\n\nThe format for locale names is languagecode_COUNTRYCODE\n\neg. en_US is: english United States\n en_GB is: english Great Britain"
|
||||
|
||||
# Configure
|
||||
@ -124,7 +124,7 @@ _PartTitle="Partitioning"
|
||||
_PartWipe="Secure Wipe"
|
||||
_PartAuto="Automatic Partitioning"
|
||||
_PartShowTree="Show Partition Table"
|
||||
_PartBody="\nFull device auto partitioning is available for beginners.\n\nUEFI systems require a vfat/fat32 partition between 100-512M in size to be mounted at /boot or /boot/efi, BIOS systems using LUKS will also require this but formatted as ext3 or ext4 instead."
|
||||
_PartBody="\nFull device auto partitioning is available for beginners otherwise cfdisk is recommended.\n\n - UEFI systems require a vfat/fat32 partition between 100-512M in size to be mounted at /boot or /boot/efi\n - BIOS systems using LUKS will also require this but it does NOT require vfat/fat32 formatting."
|
||||
|
||||
# Auto partition
|
||||
_PartBody1="\nWARNING:\n\nALL data on"
|
||||
|
@ -215,10 +215,7 @@ declare -A FS_OPTS=(
|
||||
|
||||
main()
|
||||
{
|
||||
if [[ $MENU != 'main' ]]; then
|
||||
MENU='main'
|
||||
[[ $SAVED ]] && { SEL=$SAVED; unset SAVED; } || SEL=0
|
||||
fi
|
||||
[[ $SEL ]] || SEL=0
|
||||
(( SEL < 11 )) && (( SEL++ ))
|
||||
|
||||
tput civis
|
||||
@ -238,23 +235,22 @@ main()
|
||||
"11" "$_PrepInstall")
|
||||
|
||||
if [[ $WARN != true && $SEL =~ (2|5) ]]; then
|
||||
WARN=true
|
||||
msgbox "$_PrepTitle" "$_WarnMount"
|
||||
WARN=true; msgbox "$_PrepTitle" "$_WarnMount"
|
||||
fi
|
||||
|
||||
case $SEL in
|
||||
1) device_tree ;;
|
||||
2) partition || SEL=$((SEL - 1)) ;;
|
||||
3) luks_menu || SEL=$((SEL - 1)) ;;
|
||||
4) lvm_menu || SEL=$((SEL - 1)) ;;
|
||||
5) mnt_menu || SEL=$((SEL - 1)) ;;
|
||||
6) prechecks 0 && { mkuser || SEL=$((SEL - 1)); } ;;
|
||||
7) prechecks 1 && { cfg_menu || SEL=$((SEL - 1)); } ;;
|
||||
8) prechecks 2 && { select_sessions || SEL=$((SEL - 1)); } ;;
|
||||
9) prechecks 2 && { select_packages || SEL=$((SEL - 1)); } ;;
|
||||
2) partition || (( SEL-- )) ;;
|
||||
3) luks_menu || (( SEL-- )) ;;
|
||||
4) lvm_menu || (( SEL-- )) ;;
|
||||
5) mnt_menu || (( SEL-- )) ;;
|
||||
6) prechecks 0 && { mkuser || (( SEL-- )); } ;;
|
||||
7) prechecks 1 && { cfg_menu || (( SEL-- )); } ;;
|
||||
8) prechecks 2 && { select_sessions || (( SEL-- )); } ;;
|
||||
9) prechecks 2 && { select_packages || (( SEL-- )); } ;;
|
||||
10) prechecks 2 && show_cfg ;;
|
||||
11) prechecks 2 && install ;;
|
||||
*) yesno "$_CloseInst" "$_CloseInstBody" "Exit" "Back" && die
|
||||
*) yesno "$_CloseInst" "$_CloseInstBody" && die
|
||||
esac
|
||||
}
|
||||
|
||||
@ -267,7 +263,7 @@ show_cfg()
|
||||
local mnt="${BMNTS[$SYS-$BOOTLDR]}"
|
||||
local pkgs="${USER_PKGS# } ${PACKAGES# } $BASE_PKGS"
|
||||
[[ $PACKAGES =~ (openbox|bspwm|i3-gaps) || $INSTALL_WMS == *dwm* ]] && pkgs="${pkgs# } $WM_BASE_PKGS"
|
||||
[[ $INSTALL_WMS == *dwm* ]] && pkgs="${pkgs# } dwm st dmenu"
|
||||
[[ $INSTALL_WMS == *dwm* ]] && pkgs="dwm st dmenu ${pkgs# }"
|
||||
pkgs="${pkgs# }"
|
||||
pkgs="${pkgs% }"
|
||||
msgbox "$_PrepTitle" "
|
||||
@ -536,7 +532,7 @@ select_mirrorcmd()
|
||||
|
||||
if hash reflector >/dev/null 2>&1; then
|
||||
MIRROR_CMD="reflector --score 100 -l 50 -f 5 --sort rate --verbose"
|
||||
yesno "$_MirrorTitle" "$_MirrorSetup" "Automatic" "Custom" && return 0
|
||||
yesno "$_MirrorTitle" "$_MirrorSetup" && return 0
|
||||
|
||||
c="$(json 'country_name' "$(json 'ip' "check&?access_key=${key}&fields=ip")?access_key=${key}&fields=country_name")"
|
||||
MIRROR_CMD="reflector --country $c --fastest 5 --sort rate --verbose"
|
||||
@ -620,7 +616,8 @@ select_packages()
|
||||
|
||||
tput civis
|
||||
cur=$(dialog --cr-wrap --stdout --backtitle "$BT" \
|
||||
--title " $_Packages " --default-item $cur --menu "$_PackageMenu" 0 0 0 \
|
||||
--title " $_Packages " --default-item $cur \
|
||||
--menu "$_PackageMenu" 0 0 0 \
|
||||
1 "Web Browsers" \
|
||||
2 "Text Editors" \
|
||||
3 "File Managers" \
|
||||
@ -637,7 +634,7 @@ select_packages()
|
||||
|
||||
[[ $cur && $cur -lt 13 ]] || break
|
||||
|
||||
case $SEL in
|
||||
case $cur in
|
||||
1) BROWSE_PKGS="$(select_browsers)" ;;
|
||||
2) EDIT_PKGS="$(select_editors)" ;;
|
||||
3) FM_PKGS="$(select_files)" ;;
|
||||
@ -659,7 +656,7 @@ select_packages()
|
||||
USER_PKGS+="$PROF_PKGS $VIEW_PKGS $FNT_PKGS $TOR_PKGS $SYS_PKGS $EX_PKGS"
|
||||
|
||||
for i in $USER_PKGS; do
|
||||
[[ ${PKG_EXT[$i]} && $USER_PKGS != *${PKG_EXT[$i]}* ]] && USER_PKGS+=" ${PKG_EXT[$i]}"
|
||||
[[ ${PKG_EXT[$i]} && $USER_PKGS != *"${PKG_EXT[$i]}"* ]] && USER_PKGS+=" ${PKG_EXT[$i]}"
|
||||
done
|
||||
|
||||
USER_PKGS="${USER_PKGS// / }"
|
||||
@ -671,12 +668,12 @@ select_browsers()
|
||||
{
|
||||
local pkgs=""
|
||||
pkgs="$(checkbox "$_Packages" "$_PackageBody" \
|
||||
"firefox" "A popular open-source graphical web browser from Mozilla" $(offon 'firefox') \
|
||||
"chromium" "an open-source graphical web browser based on the Blink rendering engine" $(offon 'chromium') \
|
||||
"opera" "A Fast and secure, free of charge web browser from Opera Software" $(offon 'opera') \
|
||||
"epiphany" "A GNOME web browser based on the WebKit rendering engine" $(offon 'epiphany') \
|
||||
"surf" "A simple web browser based on WebKit2/GTK+" $(offon 'surf') \
|
||||
"qutebrowser" "A keyboard-focused vim-like web browser based on Python and PyQt5" $(offon 'qutebrowser'))"
|
||||
"firefox" "A popular open-source graphical web browser from Mozilla" $(ofn 'firefox') \
|
||||
"chromium" "an open-source graphical web browser based on the Blink rendering engine" $(ofn 'chromium') \
|
||||
"opera" "A Fast and secure, free of charge web browser from Opera Software" $(ofn 'opera') \
|
||||
"epiphany" "A GNOME web browser based on the WebKit rendering engine" $(ofn 'epiphany') \
|
||||
"surf" "A simple web browser based on WebKit2/GTK+" $(ofn 'surf') \
|
||||
"qutebrowser" "A keyboard-focused vim-like web browser based on Python and PyQt5" $(ofn 'qutebrowser'))"
|
||||
printf "%s" "$pkgs"
|
||||
}
|
||||
|
||||
@ -684,11 +681,11 @@ select_editors()
|
||||
{
|
||||
local pkgs=""
|
||||
pkgs="$(checkbox "$_Packages" "$_PackageBody" \
|
||||
"neovim" "A fork of Vim aiming to improve user experience, plugins, and GUIs." $(offon 'neovim') \
|
||||
"atom" "An open-source text editor developed by GitHub that is licensed under the MIT License" $(offon 'atom') \
|
||||
"geany" "A fast and lightweight IDE" $(offon 'geany') \
|
||||
"emacs" "An extensible, customizable, self-documenting real-time display editor" $(offon 'emacs') \
|
||||
"mousepad" "A simple text editor" $(offon 'mousepad'))"
|
||||
"neovim" "A fork of Vim aiming to improve user experience, plugins, and GUIs." $(ofn 'neovim') \
|
||||
"atom" "An open-source text editor developed by GitHub that is licensed under the MIT License" $(ofn 'atom') \
|
||||
"geany" "A fast and lightweight IDE" $(ofn 'geany') \
|
||||
"emacs" "An extensible, customizable, self-documenting real-time display editor" $(ofn 'emacs') \
|
||||
"mousepad" "A simple text editor" $(ofn 'mousepad'))"
|
||||
printf "%s" "$pkgs"
|
||||
}
|
||||
|
||||
@ -696,12 +693,12 @@ select_files()
|
||||
{
|
||||
local pkgs=""
|
||||
pkgs="$(checkbox "$_Packages" "$_PackageBody" \
|
||||
"thunar" "A modern file manager for the Xfce Desktop Environment" $(offon 'thunar') \
|
||||
"pcmanfm" "A fast and lightweight file manager based in Lxde" $(offon 'pcmanfm') \
|
||||
"nautilus" "The default file manager for Gnome" $(offon 'nautilus') \
|
||||
"gparted" "A GUI frontend for creating and manipulating partition tables" $(offon 'gparted') \
|
||||
"file-roller" "Create and modify archives" $(offon 'file-roller') \
|
||||
"xarchiver" "A GTK+ frontend to various command line archivers" $(offon 'xarchiver'))"
|
||||
"thunar" "A modern file manager for the Xfce Desktop Environment" $(ofn 'thunar') \
|
||||
"pcmanfm" "A fast and lightweight file manager based in Lxde" $(ofn 'pcmanfm') \
|
||||
"nautilus" "The default file manager for Gnome" $(ofn 'nautilus') \
|
||||
"gparted" "A GUI frontend for creating and manipulating partition tables" $(ofn 'gparted') \
|
||||
"file-roller" "Create and modify archives" $(ofn 'file-roller') \
|
||||
"xarchiver" "A GTK+ frontend to various command line archivers" $(ofn 'xarchiver'))"
|
||||
printf "%s" "$pkgs"
|
||||
}
|
||||
|
||||
@ -709,15 +706,15 @@ select_terms()
|
||||
{
|
||||
local pkgs=""
|
||||
pkgs="$(checkbox "$_Packages" "$_PackageBody" \
|
||||
"termite" "A minimal VTE-based terminal emulator" $(offon 'termite') \
|
||||
"rxvt-unicode" "A unicode enabled rxvt-clone terminal emulator" $(offon 'rxvt-unicode') \
|
||||
"xterm" "The standard terminal emulator for the X window system" $(offon 'xterm') \
|
||||
"alacritty" "A cross-platform, GPU-accelerated terminal emulator" $(offon 'alacritty') \
|
||||
"terminator" "Terminal emulator that supports tabs and grids" $(offon 'terminator') \
|
||||
"sakura" "A terminal emulator based on GTK and VTE" $(offon 'sakura') \
|
||||
"tilix" "A tiling terminal emulator for Linux using GTK+ 3" $(offon 'tilix') \
|
||||
"tilda" "A Gtk based drop down terminal for Linux and Unix" $(offon 'tilda') \
|
||||
"xfce4-terminal" "A terminal emulator based in the Xfce Desktop Environment" $(offon 'xfce-terminal'))"
|
||||
"termite" "A minimal VTE-based terminal emulator" $(ofn 'termite') \
|
||||
"rxvt-unicode" "A unicode enabled rxvt-clone terminal emulator" $(ofn 'rxvt-unicode') \
|
||||
"xterm" "The standard terminal emulator for the X window system" $(ofn 'xterm') \
|
||||
"alacritty" "A cross-platform, GPU-accelerated terminal emulator" $(ofn 'alacritty') \
|
||||
"terminator" "Terminal emulator that supports tabs and grids" $(ofn 'terminator') \
|
||||
"sakura" "A terminal emulator based on GTK and VTE" $(ofn 'sakura') \
|
||||
"tilix" "A tiling terminal emulator for Linux using GTK+ 3" $(ofn 'tilix') \
|
||||
"tilda" "A Gtk based drop down terminal for Linux and Unix" $(ofn 'tilda') \
|
||||
"xfce4-terminal" "A terminal emulator based in the Xfce Desktop Environment" $(ofn 'xfce-terminal'))"
|
||||
printf "%s" "$pkgs"
|
||||
}
|
||||
|
||||
@ -725,17 +722,17 @@ select_media()
|
||||
{
|
||||
local pkgs=""
|
||||
pkgs="$(checkbox "$_Packages" "$_PackageBody" \
|
||||
"vlc" "A free and open source cross-platform multimedia player" $(offon 'vlc') \
|
||||
"mpv" "A media player based on mplayer" $(offon 'mpv') \
|
||||
"mpd" "A flexible, powerful, server-side application for playing music" $(offon 'mpd') \
|
||||
"ncmpcpp" "An mpd client and almost exact clone of ncmpc with some new features" $(offon 'ncmpcpp') \
|
||||
"cmus" "A small, fast and powerful console music player for Unix-like operating systems" $(offon 'cmus') \
|
||||
"audacious" "A free and advanced audio player based on GTK+" $(offon 'audacious') \
|
||||
"nicotine+" "A graphical client for Soulseek" $(offon 'nicotine+') \
|
||||
"lollypop" "A new music playing application" $(offon 'lollypop') \
|
||||
"rhythmbox" "Music playback and management application" $(offon 'rhythmbox') \
|
||||
"deadbeef" "A GTK+ audio player for GNU/Linux" $(offon 'deadbeef') \
|
||||
"clementine" "A modern music player and library organizer" $(offon 'clementine'))"
|
||||
"vlc" "A free and open source cross-platform multimedia player" $(ofn 'vlc') \
|
||||
"mpv" "A media player based on mplayer" $(ofn 'mpv') \
|
||||
"mpd" "A flexible, powerful, server-side application for playing music" $(ofn 'mpd') \
|
||||
"ncmpcpp" "An mpd client and almost exact clone of ncmpc with some new features" $(ofn 'ncmpcpp') \
|
||||
"cmus" "A small, fast and powerful console music player for Unix-like operating systems" $(ofn 'cmus') \
|
||||
"audacious" "A free and advanced audio player based on GTK+" $(ofn 'audacious') \
|
||||
"nicotine+" "A graphical client for Soulseek" $(ofn 'nicotine+') \
|
||||
"lollypop" "A new music playing application" $(ofn 'lollypop') \
|
||||
"rhythmbox" "Music playback and management application" $(ofn 'rhythmbox') \
|
||||
"deadbeef" "A GTK+ audio player for GNU/Linux" $(ofn 'deadbeef') \
|
||||
"clementine" "A modern music player and library organizer" $(ofn 'clementine'))"
|
||||
printf "%s" "$pkgs"
|
||||
}
|
||||
|
||||
@ -743,14 +740,14 @@ select_mail()
|
||||
{
|
||||
local pkgs=""
|
||||
pkgs="$(checkbox "$_Packages" "$_PackageBody" \
|
||||
"thunderbird" "Standalone mail and news reader from mozilla" $(offon 'thunderbird') \
|
||||
"geary" "A lightweight email client for the GNOME desktop" $(offon 'geary') \
|
||||
"evolution" "Manage your email, contacts and schedule" $(offon 'evolution') \
|
||||
"mutt" "Small but very powerful text-based mail client" $(offon 'mutt') \
|
||||
"hexchat" "A popular and easy to use graphical IRC client" $(offon 'hexchat') \
|
||||
"pidgin" "Multi-protocol instant messaging client" $(offon 'pidgin') \
|
||||
"weechat" "Fast, light and extensible IRC client" $(offon 'weechat') \
|
||||
"irssi" "Modular text mode IRC client" $(offon 'irssi'))"
|
||||
"thunderbird" "Standalone mail and news reader from mozilla" $(ofn 'thunderbird') \
|
||||
"geary" "A lightweight email client for the GNOME desktop" $(ofn 'geary') \
|
||||
"evolution" "Manage your email, contacts and schedule" $(ofn 'evolution') \
|
||||
"mutt" "Small but very powerful text-based mail client" $(ofn 'mutt') \
|
||||
"hexchat" "A popular and easy to use graphical IRC client" $(ofn 'hexchat') \
|
||||
"pidgin" "Multi-protocol instant messaging client" $(ofn 'pidgin') \
|
||||
"weechat" "Fast, light and extensible IRC client" $(ofn 'weechat') \
|
||||
"irssi" "Modular text mode IRC client" $(ofn 'irssi'))"
|
||||
printf "%s" "$pkgs"
|
||||
}
|
||||
|
||||
@ -758,18 +755,18 @@ select_prof()
|
||||
{
|
||||
local pkgs=""
|
||||
pkgs="$(checkbox "$_Packages" "$_PackageBody" \
|
||||
"libreoffice-fresh" "Full featured office suite" $(offon 'libreoffice-fresh') \
|
||||
"abiword" "Fully-featured word processor" $(offon 'abiword') \
|
||||
"calligra" "A set of applications for productivity" $(offon 'calligra') \
|
||||
"gimp" "GNU Image Manipulation Program" $(offon 'gimp') \
|
||||
"inkscape" "Professional vector graphics editor" $(offon 'inkscape') \
|
||||
"krita" "Edit and paint images" $(offon 'krita') \
|
||||
"obs-studio" "Free opensource streaming/recording software" $(offon 'obs-studio') \
|
||||
"kdenlive" "A non-linear video editor for Linux using the MLT video framework" $(offon 'kdenlive') \
|
||||
"openshot" "An open-source, non-linear video editor for Linux" $(offon 'openshot') \
|
||||
"audacity" "A program that lets you manipulate digital audio waveforms" $(offon 'audacity') \
|
||||
"guvcview" "Capture video from camera devices" $(offon 'guvcview') \
|
||||
"simplescreenrecorder" "A feature-rich screen recorder" $(offon 'simplescreenrecorder'))"
|
||||
"libreoffice-fresh" "Full featured office suite" $(ofn 'libreoffice-fresh') \
|
||||
"abiword" "Fully-featured word processor" $(ofn 'abiword') \
|
||||
"calligra" "A set of applications for productivity" $(ofn 'calligra') \
|
||||
"gimp" "GNU Image Manipulation Program" $(ofn 'gimp') \
|
||||
"inkscape" "Professional vector graphics editor" $(ofn 'inkscape') \
|
||||
"krita" "Edit and paint images" $(ofn 'krita') \
|
||||
"obs-studio" "Free opensource streaming/recording software" $(ofn 'obs-studio') \
|
||||
"kdenlive" "A non-linear video editor for Linux using the MLT video framework" $(ofn 'kdenlive') \
|
||||
"openshot" "An open-source, non-linear video editor for Linux" $(ofn 'openshot') \
|
||||
"audacity" "A program that lets you manipulate digital audio waveforms" $(ofn 'audacity') \
|
||||
"guvcview" "Capture video from camera devices" $(ofn 'guvcview') \
|
||||
"simplescreenrecorder" "A feature-rich screen recorder" $(ofn 'simplescreenrecorder'))"
|
||||
printf "%s" "$pkgs"
|
||||
}
|
||||
|
||||
@ -777,12 +774,12 @@ select_fonts()
|
||||
{
|
||||
local pkgs=""
|
||||
pkgs="$(checkbox "$_Packages" "$_PackageBody" \
|
||||
"ttf-hack" "A hand groomed and optically balanced typeface based on Bitstream Vera Mono" $(offon 'ttf-hack') \
|
||||
"ttf-anonymous-pro" "A family fixed-width fonts designed with coding in mind" $(offon 'ttf-anonymous-pro') \
|
||||
"ttf-font-awesome" "Iconic font designed for Bootstrap" $(offon 'ttf-font-awesome') \
|
||||
"ttf-fira-code" "Monospaced font with programming ligatures" $(offon 'ttf-fira-code') \
|
||||
"noto-fonts" "Google Noto fonts" $(offon 'noto-fonts') \
|
||||
"noto-fonts-cjk" "Google Noto CJK fonts (Chinese, Japanese, Korean)" $(offon 'noto-fonts-cjk'))"
|
||||
"ttf-hack" "A hand groomed and optically balanced typeface based on Bitstream Vera Mono" $(ofn 'ttf-hack') \
|
||||
"ttf-anonymous-pro" "A family fixed-width fonts designed with coding in mind" $(ofn 'ttf-anonymous-pro') \
|
||||
"ttf-font-awesome" "Iconic font designed for Bootstrap" $(ofn 'ttf-font-awesome') \
|
||||
"ttf-fira-code" "Monospaced font with programming ligatures" $(ofn 'ttf-fira-code') \
|
||||
"noto-fonts" "Google Noto fonts" $(ofn 'noto-fonts') \
|
||||
"noto-fonts-cjk" "Google Noto CJK fonts (Chinese, Japanese, Korean)" $(ofn 'noto-fonts-cjk'))"
|
||||
printf "%s" "$pkgs"
|
||||
}
|
||||
|
||||
@ -790,11 +787,11 @@ select_viewers()
|
||||
{
|
||||
local pkgs=""
|
||||
pkgs="$(checkbox "$_Packages" "$_PackageBody" \
|
||||
"evince" "A document viewer" $(offon 'evince') \
|
||||
"zathura" "Minimalistic document viewer" $(offon 'zathura') \
|
||||
"qpdfview" "A tabbed PDF viewer" $(offon 'qpdfview') \
|
||||
"mupdf" "Lightweight PDF and XPS viewer" $(offon 'mupdf') \
|
||||
"gpicview" "Lightweight image viewer" $(offon 'gpicview'))"
|
||||
"evince" "A document viewer" $(ofn 'evince') \
|
||||
"zathura" "Minimalistic document viewer" $(ofn 'zathura') \
|
||||
"qpdfview" "A tabbed PDF viewer" $(ofn 'qpdfview') \
|
||||
"mupdf" "Lightweight PDF and XPS viewer" $(ofn 'mupdf') \
|
||||
"gpicview" "Lightweight image viewer" $(ofn 'gpicview'))"
|
||||
printf "%s" "$pkgs"
|
||||
}
|
||||
|
||||
@ -802,11 +799,11 @@ select_torrent()
|
||||
{
|
||||
local pkgs=""
|
||||
pkgs="$(checkbox "$_Packages" "$_PackageBody" \
|
||||
"deluge" "A BitTorrent client written in python" $(offon 'deluge') \
|
||||
"qbittorrent" "An advanced BitTorrent client" $(offon 'qbittorrent') \
|
||||
"transmission-gtk" "Free BitTorrent client GTK+ GUI" $(offon 'transmission-gtk') \
|
||||
"transmission-qt" "Free BitTorrent client Qt GUI" $(offon 'transmission-qt') \
|
||||
"transmission-cli" "Free BitTorrent client CLI" $(offon 'transmission-cli'))"
|
||||
"deluge" "A BitTorrent client written in python" $(ofn 'deluge') \
|
||||
"qbittorrent" "An advanced BitTorrent client" $(ofn 'qbittorrent') \
|
||||
"transmission-gtk" "Free BitTorrent client GTK+ GUI" $(ofn 'transmission-gtk') \
|
||||
"transmission-qt" "Free BitTorrent client Qt GUI" $(ofn 'transmission-qt') \
|
||||
"transmission-cli" "Free BitTorrent client CLI" $(ofn 'transmission-cli'))"
|
||||
printf "%s" "$pkgs"
|
||||
}
|
||||
|
||||
@ -814,9 +811,9 @@ select_sys()
|
||||
{
|
||||
local pkgs=""
|
||||
pkgs="$(checkbox "$_Packages" "$_PackageBody" \
|
||||
"gnome-disk-utility" "Disk Management Utility" $(offon 'gnome-disk-utility') \
|
||||
"gnome-system-monitor" "View current processes and monitor system state" $(offon 'gnome-system-monitor') \
|
||||
"qt5ct" "GUI for managing Qt based application themes, icons, and fonts" $(offon 'qt5ct'))"
|
||||
"gnome-disk-utility" "Disk Management Utility" $(ofn 'gnome-disk-utility') \
|
||||
"gnome-system-monitor" "View current processes and monitor system state" $(ofn 'gnome-system-monitor') \
|
||||
"qt5ct" "GUI for managing Qt based application themes, icons, and fonts" $(ofn 'qt5ct'))"
|
||||
printf "%s" "$pkgs"
|
||||
}
|
||||
|
||||
@ -824,20 +821,15 @@ select_extra()
|
||||
{
|
||||
local pkgs=""
|
||||
pkgs="$(checkbox "$_Packages" "$_PackageBody" \
|
||||
"steam" "A popular game distribution platform by Valve" $(offon 'steam') \
|
||||
"gpick" "Advanced color picker using GTK+ toolkit" $(offon 'gpick') \
|
||||
"gcolor2" "A simple GTK+2 color selector" $(offon 'gcolor2') \
|
||||
"plank" "An elegant, simple, and clean dock" $(offon 'plank') \
|
||||
"docky" "Full fledged dock for opening applications and managing windows" $(offon 'docky') \
|
||||
"cairo-dock" "Light eye-candy fully themable animated dock" $(offon 'cairo-dock'))"
|
||||
"steam" "A popular game distribution platform by Valve" $(ofn 'steam') \
|
||||
"gpick" "Advanced color picker using GTK+ toolkit" $(ofn 'gpick') \
|
||||
"gcolor2" "A simple GTK+2 color selector" $(ofn 'gcolor2') \
|
||||
"plank" "An elegant, simple, and clean dock" $(ofn 'plank') \
|
||||
"docky" "Full fledged dock for opening applications and managing windows" $(ofn 'docky') \
|
||||
"cairo-dock" "Light eye-candy fully themable animated dock" $(ofn 'cairo-dock'))"
|
||||
printf "%s" "$pkgs"
|
||||
}
|
||||
|
||||
offon()
|
||||
{
|
||||
[[ $USER_PKGS == *$1* ]] && printf "on" || printf "off"
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# partition menus
|
||||
|
||||
@ -887,7 +879,7 @@ partition()
|
||||
elif [[ $choice != "$_PartWipe" && $choice != "$_PartAuto" && $choice != "$_PartShowTree" ]]; then
|
||||
clear; tput cnorm; $choice "$device"; partition "$device"
|
||||
elif [[ $choice == "$_PartShowTree" ]]; then
|
||||
msgbox "$_PrepShowDev" "\n$(lsblk -o NAME,MODEL,TYPE,FSTYPE,SIZE,MOUNTPOINT "$device")\n"
|
||||
msgbox "$_PartTitle" "\n$(lsblk -o NAME,MODEL,TYPE,FSTYPE,SIZE,MOUNTPOINT "$device")\n"
|
||||
partition "$device"
|
||||
elif [[ $choice == "$_PartWipe" ]]; then
|
||||
yesno "$_PartWipe" "$_PartBody1 $device $_PartWipeBody" && wipe -Ifrev $device
|
||||
@ -1273,7 +1265,7 @@ select_filesystem()
|
||||
"reiserfs" "${FS_CMDS[reiserfs]}")"
|
||||
fi
|
||||
[[ $fs ]] || return 1
|
||||
if yesno "$_FSTitle" "\nFormat $part as $fs?\n" "Format" "Go Back"; then
|
||||
if yesno "$_FSTitle" "\nFormat $part as $fs?\n"; then
|
||||
format "$part" "$fs" || return 1
|
||||
else
|
||||
select_filesystem "$part" || return 1
|
||||
@ -1298,7 +1290,7 @@ select_efi_partition()
|
||||
|
||||
if grep -q 'fat' <<< "$(fsck -N "$BOOT_PART")"; then
|
||||
local msg="$_FormUefiBody $BOOT_PART $_FormUefiBody2"
|
||||
if yesno "$_PrepMount" "$msg" "Format $BOOT_PART" "Do Not Format" "no"; then
|
||||
if yesno "$_PrepMount" "$msg" "Format $BOOT_PART" "Skip Formatting" "no"; then
|
||||
format "$BOOT_PART" "vfat"
|
||||
sleep 1
|
||||
fi
|
||||
@ -2322,18 +2314,23 @@ luks_keyfile()
|
||||
###############################################################################
|
||||
# helper functions
|
||||
|
||||
ofn()
|
||||
{
|
||||
[[ $USER_PKGS == *$1* ]] && printf "on" || printf "off"
|
||||
}
|
||||
|
||||
chrun()
|
||||
{
|
||||
arch-chroot $MNT /bin/bash -c "$1"
|
||||
}
|
||||
|
||||
json()
|
||||
{ # extract a value from http://api.ipstack.com json output
|
||||
{
|
||||
curl -s "http://api.ipstack.com/$2" | python3 -c "import sys, json; print(json.load(sys.stdin)['$1'])"
|
||||
}
|
||||
|
||||
src()
|
||||
{ # source file ($1), if it fails we die with an error message
|
||||
{
|
||||
if ! . "$1" 2>/dev/null; then
|
||||
printf "Failed to source file %s\n" "$1"
|
||||
die 1
|
||||
@ -2342,7 +2339,7 @@ src()
|
||||
}
|
||||
|
||||
is_ssd()
|
||||
{ # returns 0 (true) when the device passed ($1) is NOT a rotational device
|
||||
{
|
||||
local i dev=$1
|
||||
|
||||
# check for LVM and or LUKS for their origin devices
|
||||
@ -2362,10 +2359,8 @@ die()
|
||||
{
|
||||
(( $# >= 1 )) && local exitcode=$1 || local exitcode=0
|
||||
|
||||
# reset SIGINT and terminal
|
||||
trap - INT
|
||||
tput cnorm
|
||||
|
||||
if [[ -d $MNT ]] && command cd /; then
|
||||
umount_dir $MNT
|
||||
if (( exitcode == 127 )); then
|
||||
@ -2390,13 +2385,13 @@ die()
|
||||
}
|
||||
|
||||
sigint()
|
||||
{ # used to trap SIGINT (^C) and cleanly exit
|
||||
printf "CTRL-C caught\nCleaning up...\n"
|
||||
{
|
||||
printf "\n^C caught, cleaning up...\n"
|
||||
die 1
|
||||
}
|
||||
|
||||
print4()
|
||||
{ # takes an arbitrary number of input fields and prints them out in fourths on separate lines
|
||||
{
|
||||
local str="$*"
|
||||
if [[ $COLUMNS -gt 110 && ${#str} -gt $((COLUMNS - 10)) ]]; then
|
||||
str="$(awk '{
|
||||
@ -2434,7 +2429,6 @@ system_identify()
|
||||
{
|
||||
local efidir="/sys/firmware/efi"
|
||||
|
||||
# for virtual machine remove the ucode
|
||||
if [[ $VM ]]; then
|
||||
UCODE=""
|
||||
elif grep -q 'AuthenticAMD' /proc/cpuinfo; then
|
||||
@ -2497,7 +2491,6 @@ net_connect()
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
# if we've made it here we likely have a good connection
|
||||
return 0
|
||||
}
|
||||
|
||||
@ -2510,11 +2503,7 @@ system_checks()
|
||||
infobox "$_ErrTitle" "$_Not64Bit\n$_Exit"
|
||||
die 1
|
||||
fi
|
||||
|
||||
# setup for specific broadcom chips
|
||||
grep -q 'BCM4352' <<< "$(lspci -vnn -d 14e4:)" && load_bcm
|
||||
|
||||
# connect or confirm connection, otherwise bail
|
||||
net_connect || { infobox "$_ErrTitle" "$_NoNetwork\n$_Exit" 3; die 1; }
|
||||
}
|
||||
|
||||
@ -2631,20 +2620,18 @@ yesno()
|
||||
###############################################################################
|
||||
# entry point
|
||||
|
||||
# trap Ctrl-C to properly exit
|
||||
trap sigint INT
|
||||
|
||||
for arg in "$@"; do
|
||||
[[ $arg =~ (--debug|-d) ]] && debug
|
||||
done
|
||||
|
||||
# initial prep
|
||||
src /usr/share/archlabs/installer/lang/english.trans
|
||||
select_keymap || die 0
|
||||
system_checks
|
||||
system_identify
|
||||
system_devices
|
||||
msgbox "$_WelTitle $DIST Installer" "$_WelBody"
|
||||
select_keymap || die 0
|
||||
|
||||
while true; do
|
||||
main
|
||||
|
Reference in New Issue
Block a user