Fix ugly nmtui colours

This commit is contained in:
natemaia 2019-01-11 09:33:02 -08:00
parent a636d927e6
commit 4742d8c823

View File

@ -8,7 +8,7 @@
# Some ideas and code has been taken from other installers # Some ideas and code has been taken from other installers
# AIF, Cnichi, Calamares, The Arch Wiki.. Credit where credit is due # AIF, Cnichi, Calamares, The Arch Wiki.. Credit where credit is due
VER="1.8.6" # version VER="1.8.7" # version
DIST="ArchLabs" # distributor DIST="ArchLabs" # distributor
MNT="/mnt" # mountpoint MNT="/mnt" # mountpoint
@ -98,7 +98,6 @@ main()
chrun() chrun()
{ {
# run a shell command in the chroot dir $MNT
arch-chroot $MNT /bin/bash -c "$1" arch-chroot $MNT /bin/bash -c "$1"
} }
@ -219,12 +218,12 @@ system_identify()
local efidir="/sys/firmware/efi" local efidir="/sys/firmware/efi"
# for virtual machine remove the ucode # for virtual machine remove the ucode
if ! [[ $VM ]] && grep -q 'GenuineIntel' /proc/cpuinfo; then if [[ $VM ]]; then
UCODE="intel-ucode"
elif ! [[ $VM ]] && grep -q 'AuthenticAMD' /proc/cpuinfo; then
UCODE="amd-ucode"
else
UCODE="" UCODE=""
elif grep -q 'AuthenticAMD' /proc/cpuinfo; then
UCODE="amd-ucode"
elif grep -q 'GenuineIntel' /proc/cpuinfo; then
UCODE="intel-ucode"
fi fi
if grep -qi 'apple' /sys/class/dmi/id/sys_vendor; then if grep -qi 'apple' /sys/class/dmi/id/sys_vendor; then
@ -244,7 +243,7 @@ system_identify()
BT="$DIST Installer - $SYS - v$VER" BT="$DIST Installer - $SYS - v$VER"
} }
fix_broadcom_modules() load_bcm()
{ {
infobox "Broadcom Wireless Setup" "\nLoading wifi kernel modules please wait...\n" 1 infobox "Broadcom Wireless Setup" "\nLoading wifi kernel modules please wait...\n" 1
rmmod wl >/dev/null 2>&1 rmmod wl >/dev/null 2>&1
@ -263,7 +262,16 @@ net_connect()
if ! chk_connect; then if ! chk_connect; then
if [[ $(systemctl is-active NetworkManager) == "active" ]] && hash nmtui >/dev/null 2>&1; then if [[ $(systemctl is-active NetworkManager) == "active" ]] && hash nmtui >/dev/null 2>&1; then
tput civis tput civis
# fix ugly nmtui colours
printf "\e]P1191919" # #191919
printf "\e]P4191919" # #191919
nmtui-connect nmtui-connect
# restore
printf "\e]P1D15355" # #D15355
printf "\e]P4255a9b" # #255a9b
chk_connect || return 1 chk_connect || return 1
else else
return 1 return 1
@ -284,7 +292,7 @@ system_checks()
fi fi
# setup for specific broadcom chips # setup for specific broadcom chips
grep -q 'BCM4352' <<< "$(lspci -vnn -d 14e4:)" && fix_broadcom_modules grep -q 'BCM4352' <<< "$(lspci -vnn -d 14e4:)" && load_bcm
# connect or confirm connection, otherwise bail # connect or confirm connection, otherwise bail
net_connect || { infobox "$_ErrTitle" "$_NoNetwork\n$_Exit" 3; die 1; } net_connect || { infobox "$_ErrTitle" "$_NoNetwork\n$_Exit" 3; die 1; }