From 143836495b24f9b794ccb2e2f61cd6fa63b1ba2d Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Fri, 2 Mar 2018 11:31:43 -0700 Subject: [PATCH 1/9] gitignore for new/ folder --- .gitignore | 1 + src/progs.csv | 91 --------------------------------------------------- 2 files changed, 1 insertion(+), 91 deletions(-) create mode 100644 .gitignore delete mode 100644 src/progs.csv diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f94ab8f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +new/ diff --git a/src/progs.csv b/src/progs.csv deleted file mode 100644 index ad59588..0000000 --- a/src/progs.csv +++ /dev/null @@ -1,91 +0,0 @@ -arandr,,gui adjustment of screen, -asciiquarium,D,terminal screensaver, -atool,r,ranger archive previews, -base-devel,,sudo and compilation software, -bash-pipes,D,terminal screensaver, -biber,X,LaTeX references, -blender,B,video modification and modelling, -calcurse,,calendar, -cli-visualizer,D,music/audio visualizer, -cmatrix,D,terminal screensaver, -compton,,transparency and removing tearing, -discount,,, -dosfstools,,file system compatibility, -emacs,E,everything, -feh,,image viewer, -ffmpeg,,audio/video recording and splicing, -fzf,r,ranger fuzzy finder, -gimp,G,image modification, -git,,dling config repos, -gnome-keyring,,system keyring, -highlight,r,ranger previews highlighted, -htop-vim-git,,system info, -i3-gaps,,window manager, -i3lock,,screen lock, -imagemagick,,image conversion and modification, -libcaca,r,, -libreoffice-fresh,L,office suite, -mediainfo,r,ranger audio/video info preview, -mpc,,music daemon control, -mpd,,music daemon, -mpv,,video/gif player, -mupdf,,pdf reader, -ncmpcpp,,music player, -ncpamixer-git,,audio system manager, -neofetch,D,system stats, -neomutt,e,email client, -network-manager-applet,,GUI wifi manager, -networkmanager,,network manager, -newsboat,,RSS reader, -notmuch,e,email system (indexing and search), -notmuch-mutt,e,email system (indexing and search), -noto-fonts,F,Near Eastern Fonts, -noto-fonts-cjk,F,East Asian fonts, -noto-fonts-emoji,F,emoji fonts, -ntfs-3g,,file system compatibility, -offlineimap,e,email system (mail sync), -packer,,AUR manager, -pamixer,,audio system control, -pandoc,,file conversion, -polybar,p,status bar, -poppler,r,ranger pdf previews, -projectm-pulseaudio,,music/audio visualizer, -pulseaudio,,audio system, -pulseaudio-alsa,,audio system, -python-dbus,,, -python-gobject,,, -qutebrowser,,default browser, -r,,statistics and calculator, -ranger,r,file manager, -rofi,,command runner, -rsync,,, -sc-im,,spreadsheet manager, -screenfetch,D,system stats, -screenkey,,screencasting keyboard view, -scrot,,screenshots, -siji-git,p,polybar font symbols, -speedometer,,internet traffic view, -texlive-lang,X,LaTeX packages, -texlive-most,X,LaTeX packages, -tmux,,multiplexer and dropdown, -transmission-cli,T,torrent, -transmission-remote-cli-git,T,torrent interface, -ttf-ancient-fonts,F,rare and ancient fonts, -ttf-inconsolata,,mono font, -ttf-linux-libertine,,non-mono fonts, -unclutter-xfixes-git,,hides mouse if idle, -unrar,,extraction, -unzip,,extraction, -urlview,,url parser for terminal apps, -vim,,text editor, -vim-live-latex-preview,,latex preview, -vim-pathogen,,vim package manager, -w3m,,, -wget,,, -wireless_tools,p,polybar wifi module, -xfce-theme-blackbird,,dark theme, -xorg-server,,graphical environment, -xorg-xdpyinfo,,screencasting, -xorg-xinit,,graphical environment, -youtube-dl,,downloads youtube videos, -youtube-viewer,,watch YT videos without browser, From 1f88df726f8edb15ba09615f2ebcffada0606a77 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Fri, 2 Mar 2018 22:07:00 -0700 Subject: [PATCH 2/9] total revamp of codebase --- src/larbs.sh | 347 +++++++--------------------------------------- src/larbs_user.sh | 120 +++++----------- src/progs.csv | 93 +++++++++++++ 3 files changed, 174 insertions(+), 386 deletions(-) create mode 100644 src/progs.csv diff --git a/src/larbs.sh b/src/larbs.sh index cd38ce3..fa79130 100755 --- a/src/larbs.sh +++ b/src/larbs.sh @@ -1,336 +1,89 @@ #!/bin/bash -blue() { printf "\n\033[0;34m $* \033[0m\n\n" && (echo $* >> /tmp/LARBS.log) ;} -red() { printf "\n\033[0;31m $* \033[0m\n\n" && (echo ERROR: $* >> /tmp/LARBS.log) ;} -echo "LARBS started $(date)" >> /tmp/LARBS.log -chmod 777 /tmp/LARBS.log +echo "LARBS started $(date)" >> /tmp/LARBS.log && chmod 777 /tmp/LARBS.log -pacman -S --noconfirm --needed dialog || (echo "Error at script start: Are you sure you're running this as the root user? Are you sure you have an internet connection?" && exit) +pacman -S --noconfirm --needed dialog || (echo "Error at script start: Are you sure you're running this as the root user? Are you sure you're using an Arch-based distro? ;-) Are you sure you have an internet connection?" && exit) dialog --title "Welcome!" --msgbox "Welcome to Luke's Auto-Rice Bootstrapping Script!\n\nThis script will automatically install a fully-featured i3wm Arch Linux desktop, which I use as my main machine.\n\n-Luke" 10 60 -dialog --no-cancel --inputbox "First, please enter a name for the user account." 10 60 2> /tmp/.name +name=$(dialog --no-cancel --inputbox "First, please enter a name for the user account." 10 60 3>&1 1>&2 2>&3 3>&1) +pass1=$(dialog --no-cancel --passwordbox "Enter a password for that user." 10 60 3>&1 1>&2 2>&3 3>&1) +pass2=$(dialog --no-cancel --passwordbox "Retype password." 10 60 3>&1 1>&2 2>&3 3>&1) -dialog --no-cancel --passwordbox "Enter a password for that user." 10 60 2> /tmp/.pass1 -dialog --no-cancel --passwordbox "Retype password." 10 60 2> /tmp/.pass2 - -while [ $(cat /tmp/.pass1) != $(cat /tmp/.pass2) ] +while [ $pass1 != $pass2 ] do - dialog --no-cancel --passwordbox "Passwords do not match.\n\nEnter password again." 10 60 2> /tmp/.pass1 - dialog --no-cancel --passwordbox "Retype password." 10 60 2> /tmp/.pass2 + pass1=$(dialog --no-cancel --passwordbox "Passwords do not match.\n\nEnter password again." 10 60 3>&1 1>&2 2>&3 3>&1) + pass2=$(dialog --no-cancel --passwordbox "Retype password." 10 60 3>&1 1>&2 2>&3 3>&1) + unset pass2 done -chmod 777 /tmp/.name -NAME=$(cat /tmp/.name) -shred -u /tmp/.name -useradd -m -g wheel -s /bin/bash $NAME +dialog --infobox "Adding user \"$name\"..." 4 50 +useradd -m -g wheel -s /bin/bash $name +echo "$name:$pass1" | chpasswd -echo "$NAME:$(cat /tmp/.pass1)" | chpasswd -#I shred the password for safety's sake. -shred -u /tmp/.pass1 -shred -u /tmp/.pass2 +cmd=(dialog --separate-output --nocancel --buildlist "Press to select the packages you want to install. LARBS will install all the packages you put in the right column. -cmd=(dialog --separate-output --checklist "Select additional packages to install with :" 22 76 16) -options=(1 "LaTeX packages" off - 2 "Libreoffice Suite" off - 3 "GIMP" off - 4 "Blender" off - 5 "Emacs" off - 6 "Fonts for unicode and other languages" off - 7 "Transmission torrent client" off - 8 "Music visualizers and decoration" off - 9 "Pandoc for document management" off +Use `^` and `$` to move to the left and right columns respectively. Press when done." 22 76 16) +options=(X "LaTeX packages" off + L "Libreoffice" off + G "GIMP" off + B "Blender" off + E "Emacs" off + F "Fonts for unicode and other languages" off + T "Transmission torrent client" off + D "Music visualizers and decoration" off + P "Pandoc for document management" off ) -choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty) -echo $choices > /tmp/.choices +choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty6) -dialog --title "Let's get this party started!" --msgbox "The rest of the installation will now be totally automated, so you can sit back and relax.\n\nIt will take some time, but when done, you can relax even more with your complete system.\n\nNow just press and the system will begin installation!" 13 60 +let="\(\|[a-z]\|$(echo $choices | sed -e "s/ /\\\|/g")\)" + +dialog --title "Let's get this party started!" --msgbox "The rest of the installation will now be totally automated, so you can sit back and relax.\n\nIt will take some time, but when done, you can relax even more with your complete system.\n\nNow just press and the system will begin installation!" 13 60 || clear && exit clear -cat << "EOF" +dialog --infobox "Refreshing Arch Keyring..." 4 40 +pacman --noconfirm -Sy archlinux-keyring >/dev/tty6 - mmmmm # mmm - # "# mmm mmm mmm# m m " # - #mmmm" #" # " # #" "# "m m" m#" - # "m #"""" m"""# # # #m# " - # " "#mm" "mm"# "#m## "# # - m" -EOF -sleep 1 -cat << "EOF" +dialog --infobox "Getting program list..." 4 40 +curl https://raw.githubusercontent.com/LukeSmithxyz/larbs/master/src/progs.csv > /tmp/progs.csv +rm /tmp/aur_queue &>/dev/tty6 +count=$(cat /tmp/progs.csv | grep -G ",$let," | wc -l) +n=0 +installProgram() { ( (pacman --noconfirm --needed -S $1 &>/dev/tty6 && echo $1 installed.) || echo $1 >> /tmp/aur_queue) || echo $1 >> /tmp/larbs_failed ;} - mmmm m mmm - #" " mmm mm#mm " # - "#mmm #" # # m#" - "# #"""" # " - "mmm#" "#mm" "mm # -EOF -sleep 1 - -#Prints metal gay -cat << "EOF" - - mmm mmmm m - m" " m" "m # - # mm # # # - # # # # " - "mmm" #mm# # - -EOF -sleep .5 -cat << "EOF" - - - - = .--._ - - - ~_= =~_- = - `. `-. - ==~_ = =_ ~ - = .-' `. - --=~_ - ~ == - = .' _..:._ - ---=~ _~ = =- = `. .--.' `. - --=_-=- ~= _ - = - _.' `. .--.: - -=_~ -- = = ~- .' : : : - -=-_ ~= = - _-`--. : .--: D - -=~ _= = -~_= `; .'.: ,`---'@ - --=_= = ~- -= .' .' `._ `-.__.' - --== ~_ - = =- .' .' _.`---' - --=~_= = - = ~ .'--'' . `-..__.--. - jgs--==~ _= - ~-= =-~_- `-..___( ===; - --==~_==- =__ ~-= - - .' `---' - -EOF -sleep .5 - - -blue \[1\/6\] Now installing main programs \(system basics\)... - -pacman --noconfirm -Sy archlinux-keyring - -pacman --noconfirm --needed -Sy \ - base-devel \ - git \ - xorg-xinit \ - xorg-server \ - xorg-xdpyinfo \ - compton \ - arandr \ - ttf-inconsolata \ - ttf-linux-libertine \ - noto-fonts \ - unzip \ - unrar \ - wget \ - atool \ - ntfs-3g \ - gnome-keyring \ - dosfstools || (red Error installing system basics. Check your internet connection and pacman keyring.) - - -blue \[2\/6\] Now installing main programs \(productivity\)... -pacman --noconfirm --needed -Sy \ - calcurse \ - ranger \ - vim \ - tmux \ - rofi \ - poppler \ - mupdf || (red Error installing productivity packages. Check your internet connection and pacman keyring.) - - -blue \[3\/6\] Now installing main programs \(network and internet\)... -pacman --noconfirm --needed -Sy \ - wireless_tools \ - network-manager-applet \ - networkmanager \ - w3m \ - offlineimap \ - notmuch \ - notmuch-mutt \ - qutebrowser \ - rsync \ - newsboat || (red Error installing network packages. Check your internet connection and pacman keyring.) - - -blue \[4\/6\] Now installing main programs \(graphics\)... -pacman --noconfirm --needed -Sy \ - feh \ - imagemagick \ - scrot \ - libcaca || (red Error installing graphic packages. Check your internet connection and pacman keyring.) - - -blue \[5\/6\] Now installing main programs \(audio\)... -pacman --noconfirm --needed -Sy \ - ffmpeg \ - pulseaudio \ - pulseaudio-alsa \ - pamixer \ - mpd \ - mpc \ - ncmpcpp \ - youtube-dl \ - youtube-viewer \ - mediainfo \ - mpv || (red Error installing audio packages. Check your internet connection and pacman keyring.) - - -blue \[6\/6\] Now installing main programs \(devel\)... -pacman --noconfirm --needed -Sy \ - python-dbus \ - python-gobject \ - discount \ - r \ - highlight || (red Error installing devel packages. Check your internet connection and pacman keyring.) - - -pacman --noconfirm --needed -S fzf || (red Error with peripheral programs.) - -cat << "EOF" - _____________________________ -< Drink whole milk every day! > - ----------------------------- - \ ____________ - \ |__________| - / /\ - / / \ - /___________/___/| - | | | - | ==\ /== | | - | O O | \ \ | - | < | \ \| - /| | \ \ - / | \_____/ | / / - / /| | / /| -/||\| | /||\/ - -------------| - | | | | - <__/ \__> -EOF - -for choice in $choices +for x in $(cat /tmp/progs.csv | grep -G ",$let," | awk -F, {'print $1'}) do - case $choice in - 1) - blue Now installing LaTeX packages... - -cat << "EOF" - - mmmmm m ""# ""# " m mmmmmmm m m - # m mm mmm mm#mm mmm # # mmm m mm mmmm # mmm # mmm # # - # #" # # " # " # # # # #" # #" "# # " # # #" # ## - # # # """m # m"""# # # # # # # # # m"""# # #"""" m""m - mm#mm # # "mmm" "mm "mm"# "mm "mm mm#mm # # "#m"# #mmmmm "mm"# # "#mm" m" "m # # # - m # - "" - - # # mmmmm mmmmmmm mmmmmm mmmm m -m m mmm m mm mmm# mmm m m mmm # m mmm # # # # m" "m # -"m m m" #" "# #" " #" "# #" " # # #" " # m" # " #mmmm" # #mmmmm # # # - #m#m# # # # # # # # # # #"# """m # # # # # # " - # # "#m#" # "#m## "#mm" "mm"# "#mm" # "m "mmm" #mmmm" # # #mm# # - -EOF - pacman --noconfirm --needed -S texlive-most texlive-lang biber - ;; - 2) - blue Now installing LibreOffice Suite... - pacman --noconfirm --needed -S libreoffice-fresh - ;; - 3) - blue Now installing GIMP... - pacman --noconfirm --needed -S gimp - ;; - 4) - blue Now installing Blender... - pacman --noconfirm --needed -S blender - ;; - 5) - blue Now installing Emacs... - pacman --noconfirm --needed -S emacs - ;; - 6) - blue Now installing extra fonts... - pacman --noconfirm --needed -S noto-fonts-cjk noto-fonts-emoji - ;; - 7) - blue Now installing transmission... - pacman --noconfirm --needed -S transmission-cli - ;; - 8) - blue Now installing visualizers and decoration... - pacman --noconfirm --needed -S projectm-pulseaudio cmatrix asciiquarium screenfetch - ;; - 9) - blue Now installing pandoc... - pacman --noconfirm --needed -S pandoc pandoc-citeproc - esac + n=$((n+1)) + dialog --infobox "Downloading and installing program $n out of $count: $x..." 10 60 + installProgram $x >/dev/tty6 done -#Prints gay [autism intensifies] -cat << "EOF" - - - #" m " " m " m"" " "# - # mmm m m mm#mm mmm mmm mmmmm mmm m mm mm#mm mmm m mm mmm mmm mm#mm mmm mmm mmm # - # " # # # # # # " # # # # #" # # #" # #" # # " # # # #" # # " # - # m"""# # # # # """m # # # # # # # #"""" # # """m # # # #"""" """m # - # "mm"# "mm"# "mm mm#mm "mmm" # # # mm#mm # # "mm "#mm" # # "mmm" mm#mm # mm#mm "#mm" "mmm" # - "" "" - -EOF - -cat << "EOF" - ________________________ -< >tfw too hot to handle > - ------------------------ - \ . . . - \ . . . ` , - \ .; . : .' : : : . - \ i..`: i` i.i.,i i . - \ `,--.|i |i|ii|ii|i: - UooU\.'@@@@@@`.||' - \__/(@@@@@@@@@@)' - (@@@@@@@@) - `YY~~~~YY' - || || -EOF - +dialog --infobox "Preparing the user script..." 4 40 curl https://raw.githubusercontent.com/LukeSmithxyz/larbs/master/src/sudoers_tmp > /etc/sudoers - cd /tmp -blue Changing working directory to /tmp/... -blue Downloading next portion of the script \(larbs_user.sh\)... -curl https://raw.githubusercontent.com/LukeSmithxyz/larbs/master/src/larbs_user.sh > /tmp/larbs_user.sh && blue Running larbs_user.sh script as $NAME... -sudo -u $NAME bash /tmp/larbs_user.sh || red Error when running larbs_user.sh... +curl https://raw.githubusercontent.com/LukeSmithxyz/larbs/master/src/larbs_user.sh > /tmp/larbs_user.sh +sudo -u $name bash /tmp/larbs_user.sh rm -f /tmp/larbs_user.sh -#Prints gay "ALMOST THERE!" -cat << "EOF" - mm m m m mmmm mmmm mmmmmmm mmmmmmm m m mmmmmm mmmmm mmmmmm m - ## # ## ## m" "m #" " # # # # # # "# # # - # # # # ## # # # "#mmm # # #mmmm# #mmmmm #mmmm" #mmmmm # - #mm# # # "" # # # "# # # # # # # "m # " - # # #mmmmm # # #mm# "mmm#" # # # # #mmmmm # " #mmmmm # -EOF - -blue Installing st... - +dialog --infobox "Installing \"st\" from source..." 4 40 cd /tmp -git clone https://github.com/lukesmithxyz/st.git +git clone https://github.com/lukesmithxyz/st.git >/dev/tty6 cd st -patch < patches/transparency.diff -make -make install +patch < patches/transparency.diff >/dev/tty6 +make >/dev/tty6 +make install >/dev/tty6 cd /tmp -blue Enabling Network Manager... +dialog --infobox "Enabling Network Manager..." 4 40 systemctl enable NetworkManager systemctl start NetworkManager -blue Getting rid of that retarded error beep sound... +dialog --infobox "Getting rid of that retarded error beep sound..." 10 50 rmmod pcspkr echo "blacklist pcspkr" > /etc/modprobe.d/nobeep.conf -blue Implementing temporary sudoers file... +dialog --infobox "Updating sudoers file..." 4 40 curl https://raw.githubusercontent.com/LukeSmithxyz/larbs/master/src/sudoers > /etc/sudoers dialog --title "All done!" --msgbox "Congrats! Provided there were no hidden errors, the script completed successfully and all the programs and configuration files should be in place.\n\nTo run the new graphical environment, log out and log back in as your new user, then run the command \"startx\" to start the graphical environment.\n\n-Luke" 12 80 diff --git a/src/larbs_user.sh b/src/larbs_user.sh index 858d5ed..51e7781 100755 --- a/src/larbs_user.sh +++ b/src/larbs_user.sh @@ -1,10 +1,5 @@ #!/bin/bash -blue() { printf "\n\033[0;34m $* \033[0m\n\n" && (echo $* >> /tmp/LARBS.log) ;} -red() { printf "\n\033[0;31m $* \033[0m\n\n" && (echo ERROR: $* >> /tmp/LARBS.log) ;} - -NAME=$(whoami) - #Install an AUR package manually. aurinstall() { curl -O https://aur.archlinux.org/cgit/aur.git/snapshot/$1.tar.gz && tar -xvf $1.tar.gz && cd $1 && makepkg --noconfirm -si && cd .. && rm -rf $1 $1.tar.gz ;} @@ -16,103 +11,50 @@ do if [[ $qm = *"$arg"* ]]; then echo $arg is already installed. else - echo $arg not installed - blue Now installing $arg... - if [[ -e /usr/bin/packer ]] - then - (packer --noconfirm -S $arg && blue $arg now installed) || red Error installing $arg. - else - (aurinstall $arg && blue $arg now installed) || red Error installing $arg. - fi - + echo $arg not installed. + echo Now installing $arg... + (packer --noconfirm -S $arg && echo $arg now installed) || (aurinstall $arg && echo $arg now installed) fi done } -blue "Adjusting config files for your internet interfaces..." +echo "Adjusting config files for your internet interfaces..." wifi=$(ls /sys/class/net | grep wl) eth=$(ls /sys/class/net | grep eth) -sed -e "s/wlp3s0/$wifi/g; s/enp0s25/$eth/g" /home/$NAME/.config/polybar/config /home/$NAME/.bashrc +sed -e "s/wlp3s0/$wifi/g; s/enp0s25/$eth/g" /home/$(whoami)/.config/polybar/config /home/$(whoami)/.bashrc -blue Installing AUR programs... -blue \(This may take some time.\) +dialog --infobox "Installing \"packer\", an AUR helper..." 10 60 +aurcheck packer >/dev/tty6 -cat << "EOF" - mm m m mmmmm mmmmmmm mmmmm m m mmmmmm m - ## # # # "# # # ## ## # # - # # # # #mmmm" # # # ## # #mmmmm # - #mm# # # # "m # # # "" # # " - # # "mmmm" # " # mm#mm # # #mmmmm # -EOF +count=$(cat /tmp/aur_queue | wc -l) +n=0 -#gpg --recv-keys 5FAF0A6EE7371805 #Add the needed gpg key for neomutt - -aurcheck packer i3-gaps siji-git vim-pathogen neomutt unclutter-xfixes-git polybar xfce-theme-blackbird htop-vim-git ncpamixer-git urlview sc-im || red Error with basic AUR installations... -#Also installing i3lock, since i3-gaps was only just now installed. -sudo pacman -S --noconfirm --needed i3lock - -choices=$(cat /tmp/.choices) -for choice in $choices +for prog in $(cat /tmp/aur_queue) do - case $choice in - 1) - aurcheck vim-live-latex-preview - git clone https://github.com/lukesmithxyz/latex-templates.git && mkdir -p /home/$NAME/Documents/LaTeX && rsync -va latex-templates /home/$NAME/Documents/LaTeX && rm -rf latex-templates - ;; - 6) - aurcheck ttf-ancient-fonts - ;; - 7) - aurcheck transmission-remote-cli-git - ;; - 8) - aurcheck bash-pipes cli-visualizer speedometer neofetch screenkey - ;; - esac + n=$((n+1)) + dialog --infobox "Downloading and installing program $n out of $count: $prog..." 10 60 + aurcheck $prog >/dev/tty6 done -cat << "EOF" - ▄ ▄ - ▌▒█ ▄▀▒▌ - ▌▒▒▀▄ ▄▀▒▒▒▐ - ▐▄▀▒▒▀▀▀▀▄▄▄▀▒▒▒▒▒▐ - ▄▄▀▒▒▒▒▒▒▒▒▒▒▒█▒▒▄█▒▐ - ▄▀▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▀██▀▒▌ - ▐▒▒▒▄▄▄▒▒▒▒▒▒▒▒▒▒▒▒▒▀▄▒▒▌ - ▌▒▒▐▄█▀▒▒▒▒▄▀█▄▒▒▒▒▒▒▒█▒▐ - ▐▒▒▒▒▒▒▒▒▒▒▒▌██▀▒▒▒▒▒▒▒▒▀▄▌ - ▌▒▀▄██▄▒▒▒▒▒▒▒▒▒▒▒░░░░▒▒▒▒▌ - ▌▀▐▄█▄█▌▄▒▀▒▒▒▒▒▒░░░░░░▒▒▒▐ -▐▒▀▐▀▐▀▒▒▄▄▒▄▒▒▒▒▒░░░░░░▒▒▒▒▌ -▐▒▒▒▀▀▄▄▒▒▒▄▒▒▒▒▒▒░░░░░░▒▒▒▐ - ▌▒▒▒▒▒▒▀▀▀▒▒▒▒▒▒▒▒░░░░▒▒▒▒▌ - ▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐ - ▀▄▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▄▒▒▒▒▌ - ▀▄▒▒▒▒▒▒▒▒▒▒▄▄▄▀▒▒▒▒▄▀ - ▐▀▒▀▄▄▄▄▄▄▀▀▀▒▒▒▒▒▄▄▀ - ▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▀▀ +echo Downloading config files... +git clone https://github.com/lukesmithxyz/voidrice.git >/dev/tty6 && + rsync -va voidrice/ /home/$(whoami) >/dev/tty6 && + rm -rf voidrice >/dev/tty6 -EOF +echo Downloading email setup... +git clone https://github.com/lukesmithxyz/mutt-wizard.git /home/$(whoami)/.config/mutt >/dev/tty6 -blue Downloading config files... -git clone https://github.com/lukesmithxyz/voidrice.git && rsync -va voidrice/ /home/$NAME && rm -rf voidrice +dialog --infobox "Generating bash/ranger/qutebrowser shortcuts..." 4 60 +git clone https://github.com/LukeSmithxyz/shortcut-sync.git >/dev/tty6 && + rsync shortcut-sync/shortcuts.sh ~/.scripts/ >/dev/tty6 && + rsync shortcut-sync/folders ~/.scripts/ >/dev/tty6 && + rsync shortcut-sync/configs ~/.scripts/ >/dev/tty6 && + bash /home/$(whoami)/.scripts/shortcuts.sh >/dev/tty6 && + rm -rf shortcut-sync/ >/dev/tty6 -blue Downloading email setup... -git clone https://github.com/lukesmithxyz/mutt-wizard.git /home/$NAME/.config/mutt +dialog --infobox "Preparing welcome message..." 4 50 +curl https://raw.githubusercontent.com/LukeSmithxyz/larbs/master/src/welcome_i3 >> /home/$(whoami)/.config/i3/config -blue Downloading shortcut sync... -git clone https://github.com/LukeSmithxyz/shortcut-sync.git && - rsync shortcut-sync/shortcuts.sh ~/.scripts/ && - rsync shortcut-sync/folders ~/.scripts/ && - rsync shortcut-sync/configs ~/.scripts/ && - rm -rf shortcut-sync/ - -blue "Generating bash/ranger/qutebrowser shortcuts..." -bash /home/$NAME/.scripts/shortcuts.sh - -blue "Preparing welcome message..." -curl https://raw.githubusercontent.com/LukeSmithxyz/larbs/master/src/welcome_i3 >> /home/$NAME/.config/i3/config - -blue "Reseting Pulseaudio..." -killall pulseaudio -pulseaudio --start +dialog --infobox "Reseting Pulseaudio..." 4 50 +killall pulseaudio >/dev/tty6 +pulseaudio --start >/dev/tty6 diff --git a/src/progs.csv b/src/progs.csv new file mode 100644 index 0000000..d9c0e40 --- /dev/null +++ b/src/progs.csv @@ -0,0 +1,93 @@ +arandr,,gui adjustment of screen, +asciiquarium,D,terminal screensaver, +atool,r,ranger archive previews, +base-devel,,sudo and compilation software, +bash-pipes,D,terminal screensaver, +biber,X,LaTeX references, +blender,B,video modification and modelling, +calcurse,,calendar, +cli-visualizer,D,music/audio visualizer, +cmatrix,D,terminal screensaver, +compton,,transparency and removing tearing, +discount,,, +dosfstools,,file system compatibility, +emacs,E,everything, +exfat-utils,,file system compatibility, +feh,,image viewer, +ffmpeg,,audio/video recording and splicing, +fzf,r,ranger fuzzy finder, +gimp,G,image modification, +git,,dling config repos, +gnome-keyring,,system keyring, +highlight,r,ranger previews highlighted, +htop-vim-git,,system info, +i3-gaps,,window manager, +i3lock,,screen lock, +imagemagick,,"image conversion and modification, lock screen", +libcaca,r,, +libreoffice-fresh,L,office suite, +mediainfo,r,ranger audio/video info preview, +mpc,,music daemon control, +mpd,,music daemon, +mpv,,video/gif player, +mupdf,,pdf reader, +ncmpcpp,,music player, +ncpamixer-git,,audio system manager, +neofetch,D,system stats, +neomutt,e,email client, +network-manager-applet,,GUI wifi manager, +networkmanager,,network manager, +newsboat,,RSS reader, +notmuch,e,email system (indexing and search), +notmuch-mutt,e,email system (indexing and search), +noto-fonts,F,Near Eastern Fonts, +noto-fonts-cjk,F,East Asian fonts, +noto-fonts-emoji,F,emoji fonts, +ntfs-3g,,file system compatibility, +offlineimap,e,email system (mail sync), +packer,,AUR manager, +pamixer,,audio system control, +pandoc,P,file conversion, +pandoc-citeproc,P,, +polybar,p,status bar, +poppler,r,ranger pdf previews, +projectm-pulseaudio,D,music/audio visualizer, +pulseaudio,,audio system, +pulseaudio-alsa,,audio system, +python-dbus,,, +python-gobject,,, +qutebrowser,,default browser, +r,,statistics and calculator, +ranger,r,file manager, +rofi,,command runner, +rsync,,, +sc-im,,spreadsheet manager, +screenfetch,D,system stats, +screenkey,,screencasting keyboard view, +scrot,,screenshots, +siji-git,p,polybar font symbols, +speedometer,,internet traffic view, +texlive-lang,X,LaTeX packages, +texlive-most,X,LaTeX packages, +tmux,,multiplexer and dropdown, +transmission-cli,T,torrent, +transmission-remote-cli-git,T,torrent interface, +ttf-ancient-fonts,F,rare and ancient fonts, +ttf-inconsolata,,mono font, +ttf-linux-libertine,,non-mono fonts, +unclutter-xfixes-git,,hides mouse if idle, +unrar,,extraction, +unzip,,extraction, +urlview,,url parser for terminal apps, +vim,,text editor, +vim-live-latex-preview,X,latex preview, +vim-pathogen,,vim package manager, +w3m,,, +wget,,, +wireless_tools,p,polybar wifi module, +xfce-theme-blackbird,,dark theme, +xorg-server,,graphical environment, +xorg-xdpyinfo,,screencasting, +xorg-xinit,,graphical environment, +youtube-dl,,downloads youtube videos, +youtube-viewer,,watch YT videos without browser, From 9e6a174e936549ce867e67cf0aad2b645f9e5ba4 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Fri, 2 Mar 2018 22:08:00 -0700 Subject: [PATCH 3/9] user redirects to null --- src/larbs_user.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/larbs_user.sh b/src/larbs_user.sh index 51e7781..3bc8e1f 100755 --- a/src/larbs_user.sh +++ b/src/larbs_user.sh @@ -24,7 +24,7 @@ eth=$(ls /sys/class/net | grep eth) sed -e "s/wlp3s0/$wifi/g; s/enp0s25/$eth/g" /home/$(whoami)/.config/polybar/config /home/$(whoami)/.bashrc dialog --infobox "Installing \"packer\", an AUR helper..." 10 60 -aurcheck packer >/dev/tty6 +aurcheck packer >/dev/null count=$(cat /tmp/aur_queue | wc -l) n=0 @@ -33,28 +33,28 @@ for prog in $(cat /tmp/aur_queue) do n=$((n+1)) dialog --infobox "Downloading and installing program $n out of $count: $prog..." 10 60 - aurcheck $prog >/dev/tty6 + aurcheck $prog >/dev/null done echo Downloading config files... -git clone https://github.com/lukesmithxyz/voidrice.git >/dev/tty6 && - rsync -va voidrice/ /home/$(whoami) >/dev/tty6 && - rm -rf voidrice >/dev/tty6 +git clone https://github.com/lukesmithxyz/voidrice.git >/dev/null && + rsync -va voidrice/ /home/$(whoami) >/dev/null && + rm -rf voidrice >/dev/null echo Downloading email setup... -git clone https://github.com/lukesmithxyz/mutt-wizard.git /home/$(whoami)/.config/mutt >/dev/tty6 +git clone https://github.com/lukesmithxyz/mutt-wizard.git /home/$(whoami)/.config/mutt >/dev/null dialog --infobox "Generating bash/ranger/qutebrowser shortcuts..." 4 60 -git clone https://github.com/LukeSmithxyz/shortcut-sync.git >/dev/tty6 && - rsync shortcut-sync/shortcuts.sh ~/.scripts/ >/dev/tty6 && - rsync shortcut-sync/folders ~/.scripts/ >/dev/tty6 && - rsync shortcut-sync/configs ~/.scripts/ >/dev/tty6 && - bash /home/$(whoami)/.scripts/shortcuts.sh >/dev/tty6 && - rm -rf shortcut-sync/ >/dev/tty6 +git clone https://github.com/LukeSmithxyz/shortcut-sync.git >/dev/null && + rsync shortcut-sync/shortcuts.sh ~/.scripts/ >/dev/null && + rsync shortcut-sync/folders ~/.scripts/ >/dev/null && + rsync shortcut-sync/configs ~/.scripts/ >/dev/null && + bash /home/$(whoami)/.scripts/shortcuts.sh >/dev/null && + rm -rf shortcut-sync/ >/dev/null dialog --infobox "Preparing welcome message..." 4 50 curl https://raw.githubusercontent.com/LukeSmithxyz/larbs/master/src/welcome_i3 >> /home/$(whoami)/.config/i3/config dialog --infobox "Reseting Pulseaudio..." 4 50 -killall pulseaudio >/dev/tty6 -pulseaudio --start >/dev/tty6 +killall pulseaudio >/dev/null +pulseaudio --start >/dev/null From fb98e21ae93488b0d2c348a1f3ff09c1cfa5dffb Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Fri, 2 Mar 2018 22:21:25 -0700 Subject: [PATCH 4/9] devel mode enabled --- src/larbs.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/larbs.sh b/src/larbs.sh index fa79130..5271353 100755 --- a/src/larbs.sh +++ b/src/larbs.sh @@ -62,7 +62,10 @@ done dialog --infobox "Preparing the user script..." 4 40 curl https://raw.githubusercontent.com/LukeSmithxyz/larbs/master/src/sudoers_tmp > /etc/sudoers cd /tmp -curl https://raw.githubusercontent.com/LukeSmithxyz/larbs/master/src/larbs_user.sh > /tmp/larbs_user.sh +if [ $1 = "devel" ] +then curl https://raw.githubusercontent.com/LukeSmithxyz/larbs/devel/src/larbs_user.sh > /tmp/larbs_user.sh; +else curl https://raw.githubusercontent.com/LukeSmithxyz/larbs/master/src/larbs_user.sh > /tmp/larbs_user.sh; +fi sudo -u $name bash /tmp/larbs_user.sh rm -f /tmp/larbs_user.sh From 1f6bf8f893e90a1feea1fa826d48d9365227ad24 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Fri, 2 Mar 2018 22:23:25 -0700 Subject: [PATCH 5/9] devel added to htaccess --- www/.htaccess | 1 + 1 file changed, 1 insertion(+) diff --git a/www/.htaccess b/www/.htaccess index 1c53880..a6473e7 100644 --- a/www/.htaccess +++ b/www/.htaccess @@ -6,3 +6,4 @@ RewriteRule ^([^\.]+)$ $1.html [NC,L] Redirect /larbs.sh https://raw.githubusercontent.com/LukeSmithxyz/LARBS/master/src/larbs.sh Redirect /arch.sh https://raw.githubusercontent.com/LukeSmithxyz/LARBS/master/src/arch.sh Redirect /testing.sh https://raw.githubusercontent.com/LukeSmithxyz/LARBS/testing/src/larbs.sh +Redirect /devel.sh https://raw.githubusercontent.com/LukeSmithxyz/LARBS/devel/src/larbs.sh From 4f762537f704900683cae4ffc0aea58039628f40 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 3 Mar 2018 00:21:16 -0700 Subject: [PATCH 6/9] fixes --- src/larbs.sh | 12 ++++++------ src/progs.csv | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/larbs.sh b/src/larbs.sh index 5271353..81c5cab 100755 --- a/src/larbs.sh +++ b/src/larbs.sh @@ -18,12 +18,12 @@ do done dialog --infobox "Adding user \"$name\"..." 4 50 -useradd -m -g wheel -s /bin/bash $name -echo "$name:$pass1" | chpasswd +useradd -m -g wheel -s /bin/bash $name >/dev/tty6 +echo "$name:$pass1" | chpasswd >/dev/tty6 cmd=(dialog --separate-output --nocancel --buildlist "Press to select the packages you want to install. LARBS will install all the packages you put in the right column. -Use `^` and `$` to move to the left and right columns respectively. Press when done." 22 76 16) +Use \"^\" and \"\$\" to move to the left and right columns respectively. Press when done." 22 76 16) options=(X "LaTeX packages" off L "Libreoffice" off G "GIMP" off @@ -34,11 +34,11 @@ options=(X "LaTeX packages" off D "Music visualizers and decoration" off P "Pandoc for document management" off ) -choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty6) +choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty) let="\(\|[a-z]\|$(echo $choices | sed -e "s/ /\\\|/g")\)" -dialog --title "Let's get this party started!" --msgbox "The rest of the installation will now be totally automated, so you can sit back and relax.\n\nIt will take some time, but when done, you can relax even more with your complete system.\n\nNow just press and the system will begin installation!" 13 60 || clear && exit +dialog --title "Let's get this party started!" --msgbox "The rest of the installation will now be totally automated, so you can sit back and relax.\n\nIt will take some time, but when done, you can relax even more with your complete system.\n\nNow just press and the system will begin installation!" 13 60 || (clear && exit) clear @@ -55,7 +55,7 @@ installProgram() { ( (pacman --noconfirm --needed -S $1 &>/dev/tty6 && echo $1 i for x in $(cat /tmp/progs.csv | grep -G ",$let," | awk -F, {'print $1'}) do n=$((n+1)) - dialog --infobox "Downloading and installing program $n out of $count: $x..." 10 60 + dialog --title "LARBS Installation" --infobox "Downloading and installing program $n out of $count: $x...\n\nThe first programs will take more time due to dependencies. You can watch the output on tty6." 8 70 installProgram $x >/dev/tty6 done diff --git a/src/progs.csv b/src/progs.csv index d9c0e40..eef6140 100644 --- a/src/progs.csv +++ b/src/progs.csv @@ -9,7 +9,7 @@ calcurse,,calendar, cli-visualizer,D,music/audio visualizer, cmatrix,D,terminal screensaver, compton,,transparency and removing tearing, -discount,,, +discount,?,, dosfstools,,file system compatibility, emacs,E,everything, exfat-utils,,file system compatibility, @@ -20,7 +20,7 @@ gimp,G,image modification, git,,dling config repos, gnome-keyring,,system keyring, highlight,r,ranger previews highlighted, -htop-vim-git,,system info, +htop-vim-git,D,system info, i3-gaps,,window manager, i3lock,,screen lock, imagemagick,,"image conversion and modification, lock screen", From 11c65bb9f692101615415d796313610d401e832e Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 10 Mar 2018 18:06:15 -0700 Subject: [PATCH 7/9] fixes to devel --- src/larbs.sh | 6 +++--- src/larbs_user.sh | 14 +++++++------- src/progs.csv | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/larbs.sh b/src/larbs.sh index 81c5cab..e29f4fe 100755 --- a/src/larbs.sh +++ b/src/larbs.sh @@ -1,7 +1,5 @@ #!/bin/bash -echo "LARBS started $(date)" >> /tmp/LARBS.log && chmod 777 /tmp/LARBS.log - pacman -S --noconfirm --needed dialog || (echo "Error at script start: Are you sure you're running this as the root user? Are you sure you're using an Arch-based distro? ;-) Are you sure you have an internet connection?" && exit) dialog --title "Welcome!" --msgbox "Welcome to Luke's Auto-Rice Bootstrapping Script!\n\nThis script will automatically install a fully-featured i3wm Arch Linux desktop, which I use as my main machine.\n\n-Luke" 10 60 @@ -32,7 +30,7 @@ options=(X "LaTeX packages" off F "Fonts for unicode and other languages" off T "Transmission torrent client" off D "Music visualizers and decoration" off - P "Pandoc for document management" off + P "Pandoc and R/Rmarkdown" off ) choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty) @@ -78,6 +76,8 @@ make >/dev/tty6 make install >/dev/tty6 cd /tmp +# R markdown install. + dialog --infobox "Enabling Network Manager..." 4 40 systemctl enable NetworkManager systemctl start NetworkManager diff --git a/src/larbs_user.sh b/src/larbs_user.sh index 3bc8e1f..cce17c8 100755 --- a/src/larbs_user.sh +++ b/src/larbs_user.sh @@ -12,17 +12,11 @@ if [[ $qm = *"$arg"* ]]; then echo $arg is already installed. else echo $arg not installed. - echo Now installing $arg... - (packer --noconfirm -S $arg && echo $arg now installed) || (aurinstall $arg && echo $arg now installed) + packer --noconfirm -S $arg >/dev/null || aurinstall $arg fi done } -echo "Adjusting config files for your internet interfaces..." -wifi=$(ls /sys/class/net | grep wl) -eth=$(ls /sys/class/net | grep eth) -sed -e "s/wlp3s0/$wifi/g; s/enp0s25/$eth/g" /home/$(whoami)/.config/polybar/config /home/$(whoami)/.bashrc - dialog --infobox "Installing \"packer\", an AUR helper..." 10 60 aurcheck packer >/dev/null @@ -41,6 +35,12 @@ git clone https://github.com/lukesmithxyz/voidrice.git >/dev/null && rsync -va voidrice/ /home/$(whoami) >/dev/null && rm -rf voidrice >/dev/null +dialog --infobox "Now compiling polybar. This is the last program, but may take some time..." 10 60 +wifi=$(ls /sys/class/net | grep wl) +eth=$(ls /sys/class/net | grep eth) +sed -e "s/wlp3s0/$wifi/g; s/enp0s25/$eth/g" /home/$(whoami)/.config/polybar/config /home/$(whoami)/.bashrc +packer --noconfig -S polybar + echo Downloading email setup... git clone https://github.com/lukesmithxyz/mutt-wizard.git /home/$(whoami)/.config/mutt >/dev/null diff --git a/src/progs.csv b/src/progs.csv index eef6140..6691039 100644 --- a/src/progs.csv +++ b/src/progs.csv @@ -14,6 +14,7 @@ dosfstools,,file system compatibility, emacs,E,everything, exfat-utils,,file system compatibility, feh,,image viewer, +figlet,D,text decoration, ffmpeg,,audio/video recording and splicing, fzf,r,ranger fuzzy finder, gimp,G,image modification, @@ -23,7 +24,7 @@ highlight,r,ranger previews highlighted, htop-vim-git,D,system info, i3-gaps,,window manager, i3lock,,screen lock, -imagemagick,,"image conversion and modification, lock screen", +imagemagick,D,"image conversion and modification, lock screen", libcaca,r,, libreoffice-fresh,L,office suite, mediainfo,r,ranger audio/video info preview, @@ -49,7 +50,6 @@ packer,,AUR manager, pamixer,,audio system control, pandoc,P,file conversion, pandoc-citeproc,P,, -polybar,p,status bar, poppler,r,ranger pdf previews, projectm-pulseaudio,D,music/audio visualizer, pulseaudio,,audio system, @@ -57,14 +57,14 @@ pulseaudio-alsa,,audio system, python-dbus,,, python-gobject,,, qutebrowser,,default browser, -r,,statistics and calculator, +r,P,statistics and calculator, ranger,r,file manager, rofi,,command runner, rsync,,, sc-im,,spreadsheet manager, screenfetch,D,system stats, screenkey,,screencasting keyboard view, -scrot,,screenshots, +scrot,D,screenshots, siji-git,p,polybar font symbols, speedometer,,internet traffic view, texlive-lang,X,LaTeX packages, @@ -82,7 +82,7 @@ urlview,,url parser for terminal apps, vim,,text editor, vim-live-latex-preview,X,latex preview, vim-pathogen,,vim package manager, -w3m,,, +w3m,?,, wget,,, wireless_tools,p,polybar wifi module, xfce-theme-blackbird,,dark theme, From 4d591414df3e4cea29102ec269534dda658960ff Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 10 Mar 2018 18:44:29 -0700 Subject: [PATCH 8/9] now polybar-git used --- src/larbs_user.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/larbs_user.sh b/src/larbs_user.sh index cce17c8..704ce5c 100755 --- a/src/larbs_user.sh +++ b/src/larbs_user.sh @@ -39,7 +39,7 @@ dialog --infobox "Now compiling polybar. This is the last program, but may take wifi=$(ls /sys/class/net | grep wl) eth=$(ls /sys/class/net | grep eth) sed -e "s/wlp3s0/$wifi/g; s/enp0s25/$eth/g" /home/$(whoami)/.config/polybar/config /home/$(whoami)/.bashrc -packer --noconfig -S polybar +packer --noconfig -S polybar-git echo Downloading email setup... git clone https://github.com/lukesmithxyz/mutt-wizard.git /home/$(whoami)/.config/mutt >/dev/null From 838fef31aac8616f1ca6c6227db0d3d769570de9 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 10 Mar 2018 19:00:47 -0700 Subject: [PATCH 9/9] packer redundancy added --- src/larbs_user.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/larbs_user.sh b/src/larbs_user.sh index 704ce5c..ba2199c 100755 --- a/src/larbs_user.sh +++ b/src/larbs_user.sh @@ -39,7 +39,7 @@ dialog --infobox "Now compiling polybar. This is the last program, but may take wifi=$(ls /sys/class/net | grep wl) eth=$(ls /sys/class/net | grep eth) sed -e "s/wlp3s0/$wifi/g; s/enp0s25/$eth/g" /home/$(whoami)/.config/polybar/config /home/$(whoami)/.bashrc -packer --noconfig -S polybar-git +packer --noconfirm -S polybar || packer --noconfirm -S polybar-git echo Downloading email setup... git clone https://github.com/lukesmithxyz/mutt-wizard.git /home/$(whoami)/.config/mutt >/dev/null