| 
					
				 | 
			
			
				@@ -10,10 +10,10 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # and runs as root.  Expects `username`, `password`, and `root_password` to be 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # supplied. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-# verify supplied variables 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-[ -z "$root_password" ] && echo "missing root password..." && exit 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-[ -z "$username" ] && echo "missing username..." && exit 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-[ -z "$password" ] && echo "missing password..." && exit 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+# verify required variables 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+while [ -z "$root_password" ]; do read -p "please enter a root password: " -s root_password && echo ""; done 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+while [ -z "$username" ]; do read -p "please enter your username: " username; done 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+while [ -z "$password" ]; do read -p "please enter your password: " -s password && echo ""; done 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # print all that transpires henceforth 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 [ -n "$DEBUG" ] && set -x 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -23,7 +23,6 @@ ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 hwclock -w --utc 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # setup locale 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-# @todo: determine how to deal with dual-languages 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 sed -i "/^en_US.UTF-8/d" /etc/locale.gen 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # sed -i "/^ja_JP.UTF-8/d" /etc/locale.gen 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -44,13 +43,20 @@ echo "FONT=koi8u_8x16" > /etc/vconsole.conf 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # enable multilib 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 sed -i "/\[multilib\]/,/Include/"'s/^#//' /etc/pacman.conf 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-# update and install all packages 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-pacman -Syu --noconfirm sudo bash-completion tmux vim linux-firmware linux-headers dkms smartmontools cryptsetup usbutils btrfs-progs gvfs dmidecode parted pkgfile pkgconf bison gcc gcc-libs cmake ccache ncurses xmlstarlet jq at bc cronie iptables rsync net-tools openssh sshfs ntp wget curl wireless_tools bluez bluez-utils lzop unzip p7zip xz unrar unace lrzip arj git mercurial subversion bzr postgresql mesa lib32-mesa dbus polkit xorg-server xorg-server-devel xorg-xinit xorg-xinput xorg-xdpyinfo xdotool xsel pulseaudio vulkan-tools arandr feh hsetroot openbox obmenu archlinux-xdg-menu compton xarchiver pavucontrol pasystray xdg-utils xdg-user-dirs tint2 conky pcmanfm gmrun rxvt-unicode urxvt-perls gnome-themes-extra gnome-icon-theme arc-gtk-theme gtk-engines gtk-engine-murrine lxappearance graphicsmagick imagemagick lame libwebp libid3tag libvorbis vorbis-tools faac x264 x265 libexif ffmpeg ffmpegthumbnailer tumbler joyutils evtest lm_sensors lshw gparted psensor gparted hardinfo fontconfig ttf-bitstream-vera ttf-droid ttf-dejavu ttf-freefont ttf-liberation ttf-hanazono mpv openshot gimp krita transmission-cli evince viewnior virtualbox-host-modules-arch virtualbox vagrant guvcview dia mednafen mame ppsspp lutris steam wine python-pip python-setuptools winetricks 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+# rebuild gpg keys 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+rm -rf /etc/pacman.d/gnupg 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+pacman-key --init 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+pacman-key --populate archlinux 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # add sublime text source 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 curl -O https://download.sublimetext.com/sublimehq-pub.gpg && pacman-key --add sublimehq-pub.gpg && pacman-key --lsign-key 8A8F901A && rm sublimehq-pub.gpg 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 [ $(grep -c "sublime-text" /etc/pacman.conf) -eq 0 ] && echo -e "\n[sublime-text]\nServer = https://download.sublimetext.com/arch/stable/x86_64" | tee -a /etc/pacman.conf 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-pacman -Syu --noconfirm sublime-text 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+# update and install all packages 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+pacman -Syu --noconfirm sudo bash-completion tmux vim linux-firmware linux-headers dkms smartmontools cryptsetup usbutils btrfs-progs gvfs dmidecode parted pkgfile pkgconf bison gcc gcc-libs cmake ccache ncurses xmlstarlet jq at bc cronie iptables rsync net-tools openssh sshfs ntp wget curl wireless_tools bluez bluez-utils lzop unzip p7zip xz unrar unace lrzip arj git mercurial subversion bzr postgresql mesa lib32-mesa dbus polkit xorg-server xorg-server-devel xorg-xinit xorg-xinput xorg-xdpyinfo xdotool xsel pulseaudio vulkan-tools arandr feh hsetroot openbox obmenu archlinux-xdg-menu compton xarchiver pavucontrol pasystray xdg-utils xdg-user-dirs tint2 conky pcmanfm gmrun rxvt-unicode urxvt-perls gnome-themes-extra gnome-icon-theme arc-gtk-theme gtk-engines gtk-engine-murrine lxappearance graphicsmagick imagemagick lame libwebp libid3tag libvorbis vorbis-tools faac x264 x265 libexif ffmpeg ffmpegthumbnailer tumbler joyutils evtest lm_sensors lshw gparted psensor gparted hardinfo fontconfig ttf-bitstream-vera ttf-droid ttf-dejavu ttf-freefont ttf-liberation ttf-hanazono mpv openshot gimp krita transmission-cli evince viewnior virtualbox-host-modules-arch virtualbox vagrant guvcview dia mednafen mame ppsspp lutris steam wine python-pip python-setuptools winetricks sublime-text 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+# if the active network device is wireless install connman 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+[ -d "/sys/class/net/${active_network_device}/wireless" ] && pacman -Syu connman wpa_supplicant openvpn ethtool iwd pptpclient && systemctl enable connman 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # install protontricks 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 python3 -m pip install protontricks 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -76,17 +82,29 @@ fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # install AMD/Radeon related packages 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 if [ $(lspci | grep -i "vga" | grep -ci "amd") -gt 0 ]; then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	pacman -Syu --noconfirm xf86-video-amdgpu vulkan-radeon lib32-vulkan-radeon libva-mesa-driver lib32-libva-mesa-driver 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	pacman -Syu --noconfirm xf86-video-amdgpu vulkan-radeon lib32-vulkan-radeon libva-mesa-driver lib32-libva-mesa-driver mesa-vdpau lib32-mesa-vdpau 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	# update modules to load 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	[ $(grep -c "amd" /etc/mkinitcpio.conf) -eq 0 ] && sed -i 's/MODULES=(\(.*\))/MODULES=(\1 amdgpu radeon)/' /etc/mkinitcpio.conf 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-# temporarily create a user to install aur packages 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+# create a user to install aur packages 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export aur_username=$(head /dev/urandom | tr -dc a-z | head -c 13 ; echo '') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 useradd -r -m -s /bin/bash $aur_username 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 echo "${aur_username} ALL= NOPASSWD: /usr/bin/pacman" > /etc/sudoers.d/${aur_username} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+# install laptop packages and optimize system configuration 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+export chassistype=$(dmidecode --string chassis-type) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+if [[ "$chassistype" = "Laptop" || "$chassistype" = "Portable" || "$chassistype" = "Notebook" || "$chassistype" = "Sub Notebook" ]]; then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	pacman -Syu --noconfirm xf86-input-synaptics acpid hdparm sdparm acpilight connman wpa_supplicant openvpn ethtool iwd pptpclient 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	systemctl enable connman 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	systemctl enable acpid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	sudo -u $aur_username git clone https://aur.archlinux.org/laptop-mode-tools.git /home/${aur_username}/laptop-mode-tools 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	(cd /home/${aur_username}/laptop-mode-tools && sudo -u ${aur_username} makepkg -rcsi --noconfirm) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	systemctl enable laptop-mode 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # install xcursor-chameleon-skyblue 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 sudo -u $aur_username git clone https://aur.archlinux.org/xcursor-chameleon-skyblue.git /home/${aur_username}/xcursor-chameleon-skyblue 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 (cd /home/${aur_username}/xcursor-chameleon-skyblue && sudo -u ${aur_username} makepkg -rcsi --noconfirm) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -111,19 +129,7 @@ sudo -u $aur_username git clone https://aur.archlinux.org/libc++.git /home/${aur 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 sudo -u $aur_username git clone https://aur.archlinux.org/discord.git /home/${aur_username}/discord 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 (cd /home/${aur_username}/discord && sudo -u ${aur_username} makepkg --nocheck -rcsi --noconfirm) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-# install laptop packages and optimize system configuration 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-export chassistype=$(dmidecode --string chassis-type) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-if [[ "$chassistype" = "Laptop" || "$chassistype" = "Portable" || "$chassistype" = "Notebook" || "$chassistype" = "Sub Notebook" ]]; then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	pacman -Syu --noconfirm xf86-input-synaptics connman wpa_supplicant openvpn acpid ethtool hdparm sdparm acpilight 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	systemctl enable connman 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	systemctl enable acpid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	sudo -u $aur_username git clone https://aur.archlinux.org/laptop-mode-tools.git /home/${aur_username}/laptop-mode-tools 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	(cd /home/${aur_username}/laptop-mode-tools && sudo -u ${aur_username} makepkg -rcsi --noconfirm) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	systemctl enable laptop-mode 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-# cleanup temporary aur user 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+# cleanup aur user 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 rm -rf /etc/sudoers.d/${aur_username} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 userdel -fr $aur_username 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 unset $aur_username 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -285,7 +291,7 @@ echo "linux vmlinuz-linux" >> /boot/loader/entries/arch.conf 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 [ -f /boot/intel-ucode.img ] && echo "initrd /intel-ucode.img" >> /boot/loader/entries/arch.conf 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 [ -f /boot/amd-ucode.img ] && echo "initrd /amd-ucode.img" >> /boot/loader/entries/arch.conf 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 echo "initrd /initramfs-linux.img" >> /boot/loader/entries/arch.conf 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-echo "options root=PARTUUID=$(blkid -s PARTUUID -o value /dev/sda3) rw" >> /boot/loader/entries/arch.conf 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+echo "options root=PARTUUID=$(blkid -s PARTUUID -o value $(mount | grep ' / '|cut -d' ' -f 1)) rw" >> /boot/loader/entries/arch.conf 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 [[ $(lspci | grep -i " vga" | grep -ci " nvidia") -gt 0 && $(grep -c "nvidia" /boot/loader/entires/arch.conf) -eq 0 ]] && sed -i 's/rw/rw nvidia-dkm.modeset=1/' /boot/loader/entires/arch.conf 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # set boot loader entry as default 
			 |