Added installer as package + ly login manager + more
This commit is contained in:
parent
8b920322ba
commit
3fc42c91bd
12 changed files with 112 additions and 710 deletions
|
@ -1,32 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
rm -rf /mnt/post_install.sh
|
||||
sleep 1s
|
||||
clear
|
||||
echo -ne "
|
||||
__________________________________________________________________________________________________________
|
||||
| Thanks For Choosing Metis Linux! |
|
||||
| |
|
||||
| +-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ |
|
||||
| |M|a|g|i|c| |M|e|t|i|s| |I|n|s|t|a|l|l|e|r| |
|
||||
| +-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ |
|
||||
| |
|
||||
|---------------------------------------------------------------------------------------------------------|
|
||||
| INSTALLATION SUCCESSFUL! |
|
||||
|---------------------------------------------------------------------------------------------------------|
|
||||
| Metis Linus Installation Completed. |
|
||||
| Check: https://github.com/metis-os for details or visit https://metislinux.org |
|
||||
|---------------------------------------------------------------------------------------------------------|
|
||||
|_________________________________________________________________________________________________________|
|
||||
|
||||
"
|
||||
echo "Metis Linux Installation Finished!!!"
|
||||
echo "Umounting all the drives"
|
||||
umount -R /mnt
|
||||
echo "After Reboot login your your username and password and type startx to start GUI."
|
||||
echo "If you've installed metis-os in a VM, it may be buggy or could perform abnormal, try disabling picom compositor."
|
||||
echo "AFTER REBOOTING RUN THE FOLLOWING COMMAND IN CASE OF NO NETWORK CONNECTIO: "
|
||||
echo "1. sudo ls -s /etc/runit/sv/NetworkManager /run/runit/service"
|
||||
echo "And then rebooting in 15 seconds!!!"
|
||||
sleep 20s
|
||||
reboot
|
|
@ -1,308 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
networkError() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo -e "Couldnot connect to the internet.\nCheck your Internet Connection and please try again.\nExitting..."
|
||||
sleep 2s
|
||||
exit 1
|
||||
}
|
||||
|
||||
failed() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo -e "Something went wrong.\nThe command could not be executed correctly!\nPlease try again.\nExitting..."
|
||||
sleep 2s
|
||||
exit 1
|
||||
}
|
||||
|
||||
installationError() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo -e "Something went wrong.\nAll the packages couldn't be installed correctly!\nPlease try again.\nExitting..."
|
||||
sleep 2s
|
||||
exit 1
|
||||
}
|
||||
|
||||
configError() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo "Checking configs in new system..."
|
||||
if ! ls /mnt/config &> /dev/null; then
|
||||
echo -e "Reuired config files couldn't be copied to new system. Installation failed!\nAborting..."
|
||||
exit 1
|
||||
else
|
||||
ls /mnt/config
|
||||
echo "All good..."
|
||||
sleep 5s
|
||||
fi
|
||||
}
|
||||
|
||||
ignoreableErrors() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo -e "Something went wrong.\nThe command was not executed correctly!\nThe error can be negleted as it doesn't affect our installation.\nContinuing the installation..."
|
||||
sleep 3s
|
||||
}
|
||||
|
||||
updateMirrors() {
|
||||
sleep 2s
|
||||
clear
|
||||
if ! which rankmirrors &> /dev/null; then
|
||||
echo -e "rankmirrors command not found\nCouldn't update the repository mirrorlists\nContinuing without updating mirrors have got chances of installation failure..."
|
||||
else
|
||||
echo -e "\nUpdating latest and fastest mirrorlists to download packages faster.\nBe patient, this may take some time upto few minutes..."
|
||||
rankmirrors -n 20 /etc/pacman.d/mirrorlist > /etc/pacman.d/mirrorlist.new
|
||||
mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak || ignoreableErrors
|
||||
mv /etc/pacman.d/mirrorlist.new /etc/pacman.d/mirrorlist || failed
|
||||
echo "Mirrorlists updated..."
|
||||
sleep 2s
|
||||
fi
|
||||
}
|
||||
|
||||
checkingConnection() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo "Checking internet connection..."
|
||||
ping -c 3 metislinux.org || networkError
|
||||
echo "Cool! Internet Connection Available. Getting ready for installation..."
|
||||
sleep 3s
|
||||
}
|
||||
|
||||
settingFont() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo "Setting bigger font for better readability..."
|
||||
sleep 2s
|
||||
setfont ter-v22b || ignoreableErrors
|
||||
}
|
||||
|
||||
displayArt(){
|
||||
sleep 2s
|
||||
clear
|
||||
echo -ne "
|
||||
__________________________________________________________________________________________________________
|
||||
| |
|
||||
| +-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ |
|
||||
| |M|a|g|i|c| |M|e|t|i|s| |I|n|s|t|a|l|l|e|r| |
|
||||
| +-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ |
|
||||
| |
|
||||
|---------------------------------------------------------------------------------------------------------|
|
||||
| Official Cli installer for metis linux. |
|
||||
|---------------------------------------------------------------------------------------------------------|
|
||||
| Install Metis Linus in few clicks |
|
||||
| Check: https://github.com/metis-os for details or visit https://metislinux.org |
|
||||
|---------------------------------------------------------------------------------------------------------|
|
||||
|_________________________________________________________________________________________________________|
|
||||
"
|
||||
}
|
||||
|
||||
checkDrive(){
|
||||
if ! lsblk | grep "$drive" &> /dev/null ; then
|
||||
clear
|
||||
echo -e "$drive is not found. Check your available disks and try again.\nAborting installation\nInstallation failed..."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
diskPartition(){
|
||||
sleep 2s
|
||||
clear
|
||||
echo -ne "
|
||||
------------------------------------------------------------------------
|
||||
THIS WILL FORMAT AND DELETE ALL DATA ON THE DISK
|
||||
Please make sure you know what you are doing because
|
||||
after formating your disk there is no way to get data back
|
||||
------------------------------------------------------------------------
|
||||
"
|
||||
lsblk
|
||||
echo "Enter the drive to install metis linux on it."
|
||||
echo "Enter Drive (eg. sda or vda or nvme0n1): "
|
||||
read -r drive
|
||||
checkDrive
|
||||
sleep 2s
|
||||
clear
|
||||
lsblk
|
||||
echo "Choose a familier disk utility tool to partition your drive! [Default=cfdisk]: "
|
||||
echo " 1. fdisk"
|
||||
echo " 2. cfdisk"
|
||||
echo " 3. gdisk"
|
||||
echo " 4. parted"
|
||||
read -r partitionutility
|
||||
|
||||
case "$partitionutility" in
|
||||
1 | fdisk | Fdisk | FDISK)
|
||||
partitionutility="fdisk"
|
||||
;;
|
||||
2 | cfdisk | Cfdisk | CFDISK)
|
||||
partitionutility="cfdisk"
|
||||
;;
|
||||
3 | gdisk | Gdisk | GDISK)
|
||||
partitionutility="gdisk"
|
||||
;;
|
||||
4 | parted | Parted | PARTED)
|
||||
partitionutility="parted"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown or unsupported disk utility! Default = cfdisk."
|
||||
partitionutility="cfdisk"
|
||||
;;
|
||||
esac
|
||||
echo "$partitionutility is the selected disk utility tool for partition."
|
||||
echo "Getting ready for creating partitions!"
|
||||
sleep 2s
|
||||
clear
|
||||
echo "boot partition is mandatory for uefi systems. Skip it for legacy systems"
|
||||
echo "root partition is mandatory."
|
||||
echo "home and swap partitions are optional but recommended!"
|
||||
echo "Also, you can create a separate partition for timeshift backup (optional)!"
|
||||
echo "Getting ready in 15 seconds"
|
||||
sleep 15s
|
||||
"$partitionutility" /dev/"$drive"
|
||||
clear
|
||||
lsblk
|
||||
echo " 1. ext4"
|
||||
echo " 2. xfs"
|
||||
echo " 3. btrfs"
|
||||
echo " 4. f2fs"
|
||||
echo " Boot partition will be formatted later in fat32 file system (for uefi systems only)."
|
||||
echo "Choose your linux file system type for formatting drives [default=ext4]: "
|
||||
read -r filesystemtype
|
||||
|
||||
case "$filesystemtype" in
|
||||
1 | ext4 | Ext4 | EXT4)
|
||||
filesystemtype="ext4"
|
||||
;;
|
||||
2 | xfs | Xfs | XFS)
|
||||
filesystemtype="xfs"
|
||||
;;
|
||||
3 | btrfs | Btrfs | BTRFS)
|
||||
filesystemtype="btrfs"
|
||||
;;
|
||||
4 | f2fs | F2fs | F2FS)
|
||||
filesystemtype="f2fs"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown or unsupported Filesystem. Default = ext4."
|
||||
filesystemtype="ext4"
|
||||
;;
|
||||
esac
|
||||
echo "$filesystemtype is the selected file system type."
|
||||
echo "Getting ready for formatting drives."
|
||||
sleep 3s
|
||||
clear
|
||||
lsblk
|
||||
echo "Enter the root partition (eg: sda1 or nvme0n1p2 or vda4): "
|
||||
read -r rootpartition
|
||||
mkfs."$filesystemtype" /dev/"$rootpartition"
|
||||
mount /dev/"$rootpartition" /mnt
|
||||
if mountpoint /mnt = "/mnt is not a mountpoint"; then
|
||||
clear
|
||||
echo -e "$rootpartition is not mounted successfully. Aborting installation!\nInstallation failed..."
|
||||
exit 1
|
||||
else
|
||||
echo "Cool $rootpartition mounted at /mnt"
|
||||
sleep 2s
|
||||
fi
|
||||
|
||||
clear
|
||||
lsblk
|
||||
echo "Did you also create separate home partition? [y/n]: "
|
||||
read -r answerhome
|
||||
case "$answerhome" in
|
||||
y | Y | yes | Yes | YES)
|
||||
echo "Enter home partition (eg: sda2 or nvme0n1p1 or vda2): "
|
||||
read -r homepartition
|
||||
mkfs."$filesystemtype" /dev/"$homepartition"
|
||||
mkdir /mnt/home
|
||||
mount /dev/"$homepartition" /mnt/home
|
||||
if mountpoint /mnt/home = "/mnt/home is not a mountpoint"; then
|
||||
clear
|
||||
echo -e "$homepartition is not mounted successfully. Aborting installation!\nInstallation failed..."
|
||||
exit 1
|
||||
else
|
||||
echo "Cool $homepartition mounted at /mnt/home"
|
||||
sleep 2s
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Skipping home partition!"
|
||||
;;
|
||||
esac
|
||||
clear
|
||||
lsblk
|
||||
echo "Did you also create swap partition? [y/n]: "
|
||||
read -r answerswap
|
||||
case "$answerswap" in
|
||||
y | Y | yes | Yes | YES)
|
||||
echo "Enter swap partition (eg: sda3, nvme0n1p1or vda3): "
|
||||
read -r swappartition
|
||||
mkswap /dev/"$swappartition"
|
||||
swapon /dev/"$swappartition"
|
||||
;;
|
||||
*)
|
||||
echo "Skipping Swap partition!"
|
||||
;;
|
||||
esac
|
||||
lsblk
|
||||
sleep 2s
|
||||
}
|
||||
|
||||
installingBase() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo "Installing Base system..."
|
||||
basestrap /mnt base base-devel runit elogind-runit || installationError
|
||||
sleep 2s
|
||||
}
|
||||
|
||||
installingKernel() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo "Installing Zen Kernel with its headers and firmware..."
|
||||
basestrap /mnt linux-zen linux-firmware linux-zen-headers || installationError
|
||||
sleep 2s
|
||||
}
|
||||
|
||||
generatingFstab() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo "generating fstab file"
|
||||
fstabgen -U /mnt > /mnt/etc/fstab || failed
|
||||
echo "Checking Fstab Contents..."
|
||||
cat /mnt/etc/fstab
|
||||
sleep 3s
|
||||
}
|
||||
|
||||
copyingConfig() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo "Copying config files to new system..."
|
||||
cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist || ignoreableErrors
|
||||
cp /etc/pacman.d/metis-mirrorlist /mnt/etc/pacman.d/metis-mirrorlist || failed
|
||||
cp /etc/pacman.conf /mnt/etc/pacman.conf || failed
|
||||
mv /usr/local/config/post_install.sh /mnt/ || failed
|
||||
cp -r /usr/local/config /mnt
|
||||
configError
|
||||
}
|
||||
|
||||
firstphaseCompleted(){
|
||||
sleep 2s
|
||||
clear
|
||||
echo "First Phase Completed!"
|
||||
echo "Entering into Second Phase of Installation..."
|
||||
echo "Run the following commands to start second phase..."
|
||||
echo "1. metis-chroot /mnt"
|
||||
echo "2. ./post_install.sh"
|
||||
}
|
||||
|
||||
displayArt
|
||||
settingFont
|
||||
checkingConnection
|
||||
updateMirrors
|
||||
diskPartition
|
||||
installingBase
|
||||
installingKernel
|
||||
generatingFstab
|
||||
copyingConfig
|
||||
firstphaseCompleted
|
|
@ -1,7 +1,7 @@
|
|||
# GRUB boot loader configuration
|
||||
|
||||
GRUB_DEFAULT=0
|
||||
GRUB_TIMEOUT=5
|
||||
GRUB_TIMEOUT=0
|
||||
GRUB_DISTRIBUTOR="Metis"
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet console=tty2"
|
||||
GRUB_CMDLINE_LINUX=""
|
||||
|
|
|
@ -3,8 +3,8 @@ PRETTY_NAME="Metis Linux"
|
|||
ID=metis
|
||||
BUILD_ID=rolling
|
||||
ANSI_COLOR="0;37"
|
||||
HOME_URL="https://metislinux.org/"
|
||||
DOCUMENTATION_URL="https://wiki.metislinux.org/"
|
||||
SUPPORT_URL="https://metislinux.org/"
|
||||
HOME_URL="https://metislinux.org"
|
||||
DOCUMENTATION_URL="https://metislinux.org/wiki/"
|
||||
SUPPORT_URL="https://t.me/metislinux"
|
||||
BUG_REPORT_URL="https://github.com/metis-os/"
|
||||
LOGO=metislinux
|
||||
LOGO=metislinux
|
||||
|
|
|
@ -1,285 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
failed() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo -e "Something went wrong.\nThe command could not be executed correctly!\nPlease try again.\nExitting..."
|
||||
sleep 2s
|
||||
exit 1
|
||||
}
|
||||
|
||||
installationError() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo -e "Something went wrong.\nAll the packages couldn't be installed correctly!\nPlease try again.\nExitting..."
|
||||
sleep 2s
|
||||
exit 1
|
||||
}
|
||||
|
||||
ignoreableErrors() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo -e "Something went wrong.\nOS is installing and could be useable but the error should be manually fixed later..."
|
||||
sleep 3s
|
||||
}
|
||||
|
||||
displayArt(){
|
||||
sleep 1s
|
||||
clear
|
||||
echo -ne "
|
||||
Installing Metis Linux in a VM is not recommended as it may perform slow and buggy.
|
||||
__________________________________________________________________________________________________________
|
||||
| |
|
||||
| +-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ |
|
||||
| |M|a|g|i|c| |M|e|t|i|s| |I|n|s|t|a|l|l|e|r| |
|
||||
| +-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ |
|
||||
| |
|
||||
|---------------------------------------------------------------------------------------------------------|
|
||||
| PHASE 2 |
|
||||
|---------------------------------------------------------------------------------------------------------|
|
||||
| Install Metis Linus in few clicks |
|
||||
| Check: https://github.com/metis-os for details or visit https://metislinux.org |
|
||||
|---------------------------------------------------------------------------------------------------------|
|
||||
|_________________________________________________________________________________________________________|
|
||||
"
|
||||
sleep 4s
|
||||
}
|
||||
|
||||
generatingLocale() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo "Generating locale at /etc/locale.gen"
|
||||
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen || ignoreableErrors
|
||||
locale-gen
|
||||
}
|
||||
|
||||
timezone() {
|
||||
echo "Getting Timezone..."
|
||||
time_zone="$(curl --fail https://ipapi.co/timezone)"
|
||||
clear
|
||||
echo "System detected your timezone to be $time_zone"
|
||||
echo "Is this correct?"
|
||||
|
||||
PS3="Select one.[1/2]: "
|
||||
options=("Yes" "No")
|
||||
select one in "${options[@]}"; do
|
||||
case $one in
|
||||
Yes)
|
||||
echo "${time_zone} set as timezone"
|
||||
ln -sf /usr/share/zoneinfo/"$time_zone" /etc/localtime && break
|
||||
;;
|
||||
No)
|
||||
echo "Please enter your desired timezone e.g. Europe/London :"
|
||||
read -r new_timezone
|
||||
echo "${new_timezone} set as timezone"
|
||||
ln -sf /usr/share/zoneinfo/"$time_zone" /etc/localtime && break
|
||||
;;
|
||||
*) echo "Wrong option. Try again";timezone;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
settingTimezone() {
|
||||
sleep 2s
|
||||
clear
|
||||
timezone
|
||||
hwclock --systohc
|
||||
echo "Checking system date and time..."
|
||||
date
|
||||
sleep 2s
|
||||
}
|
||||
|
||||
settingLang() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo "Setting LANG variable"
|
||||
echo "LANG=en_US.UTF-8" >> /etc/locale.conf
|
||||
echo "LC_COLLATE=C" >> /etc/locale.conf
|
||||
echo "Checking system language..."
|
||||
cat /etc/locale.conf || ignoreableErrors
|
||||
sleep 3s
|
||||
}
|
||||
|
||||
settingKeyboard() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo "Setting console keyboard layout"
|
||||
echo "KEYMAP=us" > /etc/vconsole.conf
|
||||
echo "Checking system Keyboard Layout..."
|
||||
cat /etc/locale.conf || ignoreableErrors
|
||||
sleep 3s
|
||||
}
|
||||
|
||||
settingHostname() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo "Enter your computer name: "
|
||||
read -r hostname
|
||||
echo "$hostname" > /etc/hostname
|
||||
echo "Checking hostname (/etc/hostname)"
|
||||
cat /etc/hostname || ignoreableErrors
|
||||
sleep 3s
|
||||
}
|
||||
|
||||
settingHosts() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo "setting up hosts file"
|
||||
{
|
||||
echo "127.0.0.1 localhost"
|
||||
echo "::1 localhost"
|
||||
echo "127.0.1.1 $hostname.localdomain $hostname"
|
||||
} >> /etc/hosts
|
||||
|
||||
echo "checking /etc/hosts file"
|
||||
cat /etc/hosts || ignoreableErrors
|
||||
sleep 3s
|
||||
}
|
||||
|
||||
installingBootloader() {
|
||||
clear
|
||||
#if you are dualbooting, add os-prober with grub and efibootmgr
|
||||
echo "Installing grub networkmanager and zsh shell..."
|
||||
pacman -Sy --needed --noconfirm grub networkmanager-runit zsh || installationError
|
||||
sleep 3s
|
||||
}
|
||||
|
||||
enablingServices() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo "Enabling NetworkManager"
|
||||
ln -s /etc/runit/sv/NetworkManager /etc/runit/runsvdir/default
|
||||
clear
|
||||
}
|
||||
|
||||
addingUser() {
|
||||
clear
|
||||
echo "Enter password for root user!"
|
||||
passwd
|
||||
sleep 1s
|
||||
clear
|
||||
echo "Adding regular user!"
|
||||
echo "Enter username to add a regular user: "
|
||||
read -r username
|
||||
useradd -m -g users -G wheel,audio,video,network,storage -s /bin/zsh "$username" || ignoreableErrors
|
||||
echo "To set password for $username, use different password than of root."
|
||||
echo "Enter password for $username! "
|
||||
passwd "$username"
|
||||
echo "NOTE: ALWAYS REMEMBER THIS USERNAME AND PASSWORD YOU PUT JUST NOW."
|
||||
sleep 3s
|
||||
}
|
||||
|
||||
sudoAccess() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo "Giving sudo access to $username!"
|
||||
echo "$username ALL=(ALL) ALL" >> /etc/sudoers.d/"$username"
|
||||
}
|
||||
|
||||
copyingConfig() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo "Copying config file to their absolute path..."
|
||||
mv /config/os-release /usr/lib/ || failed
|
||||
mv /config/grub /etc/default/grub || failed
|
||||
|
||||
mv /config/xinitrc /home/"$username"/.xinitrc || failed
|
||||
chown "$username":users /home/"$username"/.xinitrc || failed
|
||||
mv /config/zshrc /home/"$username"/.zshrc || failed
|
||||
chown "$username":users /home/"$username"/.zshrc || failed
|
||||
|
||||
sleep 1s
|
||||
mv /config /home/"$username"/.config/ || ignoreableErrors
|
||||
chown -R "$username":users /home/"$username"/.config || ignoreableErrors
|
||||
sleep 1s
|
||||
}
|
||||
|
||||
installingPackages() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo "Installing require packages for metis-os"
|
||||
pacman -Sy --needed --noconfirm metis-dwm metis-st metis-dmenu metis-wallpapers xorg-server xorg-xinit xorg-xsetroot nerd-fonts-jetbrains-mono ttf-font-awesome pavucontrol pulseaudio pulseaudio-alsa firefox brillo linux-zen-headers linux-firmware curl git neovim zsh metis-slstatus picom-jonaburg-git acpi xwallpaper || installationError
|
||||
}
|
||||
|
||||
installingMicrocode() {
|
||||
sleep 2s
|
||||
clear
|
||||
if lscpu | grep "GenuineIntel"; then
|
||||
echo "Installing Intel microcode"
|
||||
pacman -S --noconfirm --needed intel-ucode || ignoreableErrors
|
||||
elif lscpu | grep "AuthenticAMD"; then
|
||||
echo "Installing AMD microcode"
|
||||
pacman -S --noconfirm --needed amd-ucode || ignoreableErrors
|
||||
fi
|
||||
}
|
||||
|
||||
configuringBootloader() {
|
||||
sleep 2s
|
||||
clear
|
||||
if [[ ! -d "/sys/firmware/efi" ]]; then
|
||||
echo "Legacy system detected..."
|
||||
echo "Enter the drive name to install bootloader in it. (eg: sda or nvme01 or vda or something similar)! "
|
||||
echo "NOTE: JUST GIVE DRIVE NAME (sda, nvme0n1, vda or something similar); NOT THE PARTITION NAME (sda1)"
|
||||
echo "Enter the drive name: "
|
||||
read -r grubdrive
|
||||
grub-install --target=i386-pc /dev/"$grubdrive"
|
||||
grub-mkconfig -o /boot/grub/grub.cfg
|
||||
else
|
||||
echo "UEFI system detected..."
|
||||
echo "Installing efibootmgr"
|
||||
pacman -Sy --needed --noconfirm efibootmgr dosfstools
|
||||
sleep 2s
|
||||
clear
|
||||
lsblk
|
||||
echo "Enter partition to install grub! (eg: sda2 or nvme0n1p3, vda4 or something similar): "
|
||||
read -r grubpartition
|
||||
mkfs.fat -F 32 /dev/"$grubpartition"
|
||||
mkdir -p /boot/efi
|
||||
mount /dev/"$grubpartition" /boot/efi
|
||||
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB --removable
|
||||
grub-mkconfig -o /boot/grub/grub.cfg
|
||||
fi
|
||||
sleep 2s
|
||||
}
|
||||
|
||||
graphicsDriver() {
|
||||
sleep 2s
|
||||
clear
|
||||
echo "Searching and Installing graphics driver if available"
|
||||
if lspci | grep "NVIDIA|GeForce"; then
|
||||
pacman -S --noconfirm --needed nvidia nvidia-utils || ignoreableErrors
|
||||
elif lspci | grep 'VGA' | grep -E "Radeon|AMD"; then
|
||||
pacman -S --noconfirm --needed xf86-video-amdgpu || ignoreableErrors
|
||||
elif lspci | grep "Integrated Graphics Controller"; then
|
||||
pacman -S --noconfirm --needed libva-intel-driver libvdpau-va-gl vulkan-intel libva-utils || ignoreableErrors
|
||||
elif lspci | grep -E "Intel Corporation UHD|Intel Corporation HD"; then
|
||||
pacman -S --needed --noconfirm libva-intel-driver libvdpau-va-gl vulkan-intel libva-intel-driver libva-utils || ignoreableErrors
|
||||
fi
|
||||
}
|
||||
|
||||
secondphaseCompleted(){
|
||||
sleep 2s
|
||||
clear
|
||||
echo "Second Phase Completed!"
|
||||
echo "Entering into Final Phase of Installation..."
|
||||
echo "Run the following commands to start final phase..."
|
||||
echo "1. exit"
|
||||
echo "2. final.sh"
|
||||
}
|
||||
|
||||
displayArt
|
||||
generatingLocale
|
||||
settingTimezone
|
||||
settingLang
|
||||
settingKeyboard
|
||||
settingHostname
|
||||
settingHosts
|
||||
installingBootloader
|
||||
addingUser
|
||||
sudoAccess
|
||||
copyingConfig
|
||||
installingPackages
|
||||
installingMicrocode
|
||||
configuringBootloader
|
||||
graphicsDriver
|
||||
secondphaseCompleted
|
4
base/root-overlay/usr/local/config/xinitrc
Normal file → Executable file
4
base/root-overlay/usr/local/config/xinitrc
Normal file → Executable file
|
@ -1,6 +1,8 @@
|
|||
#!/usr/bin/sh
|
||||
|
||||
slstatus &
|
||||
picom &
|
||||
xwallpaper --zoom /usr/share/backgrounds/metis/b-01-dark.png &
|
||||
while true; do
|
||||
dwm >/dev/null 2>&1
|
||||
done
|
||||
done
|
||||
|
|
|
@ -11,7 +11,7 @@ export IP="2334242343"
|
|||
# History in cache directory:
|
||||
HISTSIZE=10000000
|
||||
SAVEHIST=10000000
|
||||
HISTFILE=~/.cache/zsh/history
|
||||
HISTFILE=~/history
|
||||
export PATH=$PATH:/$HOME/.local/bin
|
||||
# Load aliases and shortcuts if existent.
|
||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc"
|
||||
|
@ -62,8 +62,10 @@ lfcd () {
|
|||
[ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
|
||||
fi
|
||||
}
|
||||
bindkey -s '^o' 'lfcd\n'
|
||||
#ALIAS
|
||||
alias vim="nvim"
|
||||
|
||||
bindkey -s '^o' 'lfcd\n'
|
||||
|
||||
bindkey -s '^f' 'cd "$(dirname "$(fzf)")"\n'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue