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