diff options
-rwxr-xr-x | arch-magik.sh | 52 |
1 files changed, 32 insertions, 20 deletions
diff --git a/arch-magik.sh b/arch-magik.sh index fcc5b1d..a67761c 100755 --- a/arch-magik.sh +++ b/arch-magik.sh @@ -12,9 +12,10 @@ sed -i "s/^#ParallelDownloads = 5$/ParallelDownloads = 15/" /etc/pacman.conf sed -i '/Color/s/^#//g' /etc/pacman.conf sed -i '/ParallelDownloads = 15/a ILoveCandy' /etc/pacman.conf -#Updating mirrorlist +#Updating mirrorlist for faster downloads +country=$(curl -4 ifconfig.co/country-iso) pacman --noconfirm -Sy reflector -reflector -c India -c Worldwide -a 12 -p https --sort rate --save /etc/pacman.d/mirrorlist +reflector -c $country -c Worldwide -a 12 -p https --sort rate --save /etc/pacman.d/mirrorlist pacman -Syyy pacman --noconfirm -Sy archlinux-keyring @@ -51,7 +52,8 @@ mount $efipartition /mnt/boot if [[ $answerhome = y ]] ; then mount $hpartition /mnt/home fi -pacstrap /mnt base base-devel linux linux-firmware linux-headers util-linux vim intel-ucode +pacstrap /mnt base base-devel linux linux-firmware linux-headers util-linux vim intel-ucode wget --noconfirm --needed +cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist genfstab -U /mnt >> /mnt/etc/fstab sed '1,/^#part2$/d' `basename $0` > /mnt/arch_install2.sh chmod +x /mnt/arch_install2.sh @@ -64,6 +66,7 @@ pacman -S --noconfirm sed sed -i "s/^#ParallelDownloads = 5$/ParallelDownloads = 15/" /etc/pacman.conf sed -i '/Color/s/^#//g' /etc/pacman.conf sed -i '/ParallelDownloads = 15/a ILoveCandy' /etc/pacman.conf +sed -i "/\[multilib\]/,/Include/"'s/^#//' /etc/pacman.conf ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime hwclock --systohc @@ -72,6 +75,7 @@ sed -i '/en_US.UTF-8 UTF-8/s/^#//g' /etc/locale.gen sed -i '/en_US ISO-8859-1/s/^#//g' /etc/locale.gen sed -i '13 a\# en_US ISO-8859-1' /etc/locale.gen sed -i '14 a\# en_US.UTF-8 UTF-8' /etc/locale.gen +echo "LC_ALL=en_US.UTF-8" | tee -a /etc/environment locale-gen echo "LANG=en_US.UTF-8" > /etc/locale.conf @@ -89,11 +93,11 @@ sed -i 's/quiet/pci=noaer/g' /etc/default/grub sed -i 's/auto/1920x1080x32/g' /etc/default/grub grub-mkconfig -o /boot/grub/grub.cfg -pacman --noconfirm -S xorg-server xorg-xinit xorg-xkill xorg-xbacklight \ +pacman --noconfirm --needed -Sy xorg-server xorg-xinit xorg-xkill xorg-xbacklight \ gnu-free-fonts ttf-jetbrains-mono ttf-joypixels ttf-font-awesome \ sxiv mpv zathura zathura-pdf-mupdf ffmpeg ffmpegthumbnailer imagemagick \ vi vim fzf man-db xwallpaper python-pywal unclutter xclip maim \ - zip unzip unrar p7zip xdotool brightnessctl redshift \ + zip unzip unrar p7zip nvidia xdotool brightnessctl redshift \ git sxhkd zsh pipewire pipewire-pulse rsync qutebrowser \ ranger libnotify dunst wget jq aria2 cowsay neofetch neovim \ dhcpcd wpa_supplicant networkmanager pamixer mpd ncmpcpp \ @@ -101,7 +105,9 @@ pacman --noconfirm -S xorg-server xorg-xinit xorg-xkill xorg-xbacklight \ polkit polkit-gnome trash-cli geoip bluez bluez-utils yt-dlp && systemctl enable NetworkManager.service -sed -i '/ %wheel ALL=(ALL:ALL) NOPASSWD: ALL/s/^#//g' /etc/sudoers +sed -i 's/^# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers +sed -i 's/^# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers +#sed -i '/ %wheel ALL=(ALL:ALL) NOPASSWD: ALL/s/^#//g' /etc/sudoers echo "Enter Username: " read username useradd -m -G wheel -s /bin/bash $username @@ -112,7 +118,7 @@ sed '1,/^#part3$/d' arch_install2.sh > $ai3_path chown $username:$username $ai3_path chmod +x $ai3_path su -c $ai3_path -s /bin/sh $username -echo "Arch Installation is complete! Onto Ricing" +echo "Arch Installation is complete! Onto Ricing" exit #part3 @@ -143,17 +149,18 @@ cd ~/.local/src/dwmblocks sudo make clean install && git remote set-url origin git@github.com:justsaumit/dwmblocks.git -# yay: AUR helper +# pikaur: AUR helper cd $HOME -git clone https://aur.archlinux.org/yay.git -cd yay -makepkg -si +git clone https://aur.archlinux.org/pikaur.git +cd pikaur +makepkg -fsri cd -aurprogs='nerd-fonts-ubuntu-mono adobe-source-code-pro-fonts libxft-bgra picom-git - betterlockscreen brave-bin brillo dragon-drop fsearch gotop-bin bashtop - jdownloader2 librewolf-bin quich-git whatsapp-nativefier spotify - ytfzf notepadqq arc-darkest-theme-git galculator gparted' -yay --noconfirm -S $aurprogs && yay -S $aurprogs +aurprogs='nerd-fonts-fira-code nerd-fonts-ubuntu-mono adobe-source-code-pro-fonts + libxft-bgra picom-git betterlockscreen brave-bin brillo dragon-drop fsearch + gotop-bin bashtop jdownloader2 librewolf-bin quich-git whatsapp-nativefier + spotify ytfzf notepadqq arc-darkest-theme-git galculator gparted' + +pikaur --noconfirm -S $aurprogs wallp=~/pix/Wallpaper/w/wow mkdir -pv $wallp wget -P $wallp https://images5.alphacoders.com/125/1255724.jpg & @@ -173,16 +180,21 @@ cd ~/.dotfiles sudo mkdir -pv /boot/grub/themes sudo cp -rf boot/grub/themes/CyberRe /boot/grub/themes/ # using asterisk as separatpr -sudo sed -i 's*#GRUB_THEME="/path/to/gfxtheme"*GRUB_THEME=/boot/grub/themes/CyberRe/theme.txt*g' grub +sudo sed -i 's*#GRUB_THEME="/path/to/gfxtheme"*GRUB_THEME=/boot/grub/themes/CyberRe/theme.txt*g' /etc/default/grub sudo grub-mkconfig -o /boot/grub/grub.cfg cd sudo mkdir -pv /etc/X11/xorg.conf.d/ /etc/udev/rules.d/ sudo cp $HOME/.dotfiles/etc/X11/xorg.conf.d/30-touchpad.conf /etc/X11/xorg.conf.d/30-touchpad.conf sudo cp $HOME/.dotfiles/etc/udev/rules.d/90-backlight.rules /etc/udev/rules.d/90-backlight.rules -sudo sed -i '/ %wheel ALL=(ALL:ALL) ALL/s/^#//g' /etc/sudoers -sudo sed -i 's/^[^#]* %wheel ALL=(ALL:ALL) NOPASSWD: ALL/#&/' /etc/sudoers - +#sudo sed -i '/ %wheel ALL=(ALL:ALL) ALL/s/^#//g' /etc/sudoers +#sudo sed -i 's/^[^#]* %wheel ALL=(ALL:ALL) NOPASSWD: ALL/#&/' /etc/sudoers +# Remove no password sudo rights +sudo sed -i 's/^%wheel ALL=(ALL) NOPASSWD: ALL/# %wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers +sudo sed -i 's/^%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers +# Add sudo rights +sudo sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers +sudo sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers echo "Post-Installation Ricing Complete! reboot your system to see the changes" exit |