larbs

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 69e02fc205e4f3945e59aae51a8edbc9177c3071
parent 2f4a15661fa67c605b68168f6108c52b0fcd9bd3
Author: Luke <luke@lukesmith.xyz>
Date:   Sun,  8 Oct 2017 19:52:15 -0700

full website now part of repository

Diffstat:
Aindex.html | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aold/aur_packages.sh | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aold/install_packages.sh | 109+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aold/new_user.sh | 21+++++++++++++++++++++
Aold/one.sh | 47+++++++++++++++++++++++++++++++++++++++++++++++
Aold/root.sh | 41+++++++++++++++++++++++++++++++++++++++++
Aold/user.sh | 21+++++++++++++++++++++
Apix/arch.jpg | 0
Apix/arch.png | 0
Apix/autism.jpg | 0
Apix/faveicon.ico | 0
Apix/gnu-linux.jpg | 0
Apix/i3.jpg | 0
Apix/larbs.jpg | 0
Apix/vim.jpg | 0
Astyle.css | 25+++++++++++++++++++++++++
16 files changed, 404 insertions(+), 0 deletions(-)

diff --git a/index.html b/index.html @@ -0,0 +1,66 @@ +<!DOCTYPE html> + +<html> + +<head> +<link rel='stylesheet' type='text/css' href='style.css'> +<link rel="icon" type="image/png" href="pix/faveicon.ico"> +<title>LARBS&mdash;Luke's Auto-Rice Bootstrapping Scripts</title> +</head> +<h1>LARBS</h1> + +<h2><a target="_blank" href="http://lukesmith.xyz">Luke's</a> Auto-Rice Bootstrapping Scripts</h2> + +<table class="image"> + <caption align="bottom">(Not actually Luke)</caption> + <tr><td><a href="pix/arch.jpg"><img src="pix/arch.jpg" width="300"></a></td></tr> +</table> + +<p>The LARBS are a series of shell scripts that will automatically install a fully-featured Arch Linux i3-gaps Desktop Environment, providing a perfect composite of both functionality and customizability.</p> + +<p><b>Warning!</b> Until I put up a video on YouTube on these scripts, they are in still actively in development and the usage may be haphazard or non-functional at times. I'm literally testing these on new installs several times a day, making several dozen little tweaks every 24 hours. Only run these on new systems where there is no threat of data loss (although I don't see how data loss could happen given what the scripts do, just exercise caution until the official release). If you do run into errors, email me (<a href="mailto:luke@lukesmith.xyz">luke@lukesmith.xyz</a>) and I might give you some credit.</p> + +<p>For the official announcement of release, follow me on <a href="https://youtube.com/lukesmithxyz">YouTube</a>, by <a href="http://lukesmith.xyz/rss.xml">RSS</a> or on Twitter (<a href="https://twitter.com/lukesfiat">@lukesfiat</a>).</p> + +<h3>Installation</h3> + +<p>In any install of Arch Linux, simply log in as the root user and run the following in the terminal:</p> + +<code> +curl -O larbs.xyz/larbs.sh</br> + +./larbs.sh + +</code> + +<p>This will begin a prompt and the installation after some setup. Installation time can vary depending on internet connection. Don't be worried if it takes even a little more than an hour: it's setting <em>everything</em> up.</p> + +<p>You should be able to run LARBS on an already-configured system, and also other distributions that use Arch repositories, but I recommend running LARBS only on fresh Arch installations (I've never tried it myself on other distros, but it should work on a distro with pacman and access to the Arch repositories). </p> + + +<h3>Learning the system is fun and easy!</h3> + +<p>You can figure out about the system in a lot of different ways:</p> + +<ul> + <li>The documentation on the <a href="https://github.com/lukesmithxyz/voidrice">Github</a> page.</li> + <li>By pressing Super+F1 while in the system itself at any time. (Also <a target="_blank" href="https://github.com/LukeSmithxyz/voidrice/blob/master/.config/i3/i3_guide.md">here</a>.)</li> + <li>The many illustrative videos on <a target="_blank" href="https://youtube.com/lukesmithxyz">my YouTube channel</a>.</li> + <li>By just installing it and diving in!</li> +</ul> + +<h3>Contact!</h3> + +<p>You can also ask me questions via email at <a href="mailto:luke@lukesmith.xyz">luke@lukesmith.xyz</a>.</p> + +<p>I'll be posting updates about LARBS either on <a target="_blank" href="http://lukesmith.xyz/rss.xml">my RSS feed</a> or on <a target="_blank" href="https://twitter.com/lukesfiat">Twitter</a>.</p> + +<footer> +<a href="https://gnu.org"><img src="pix/gnu-linux.jpg"></a> + +<a href="https://i3wm.org"><img src="pix/i3.jpg"></a> + +<a href="http://vim.org"><img src="pix/vim.jpg"></a> + +<a href="https://en.wikipedia.org/wiki/Autism"><img src="pix/autism.jpg"></a> = +<a href="http://larbs.xyz"><img src="pix/larbs.jpg"></a> +</footer> + +</html> diff --git a/old/aur_packages.sh b/old/aur_packages.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +blue() { printf "\033[0;34m $* \033[0m\n" && (sudo echo $* >> LARBS.log) ;} +red() { printf "\033[0;31m $* \033[0m\n" && (sudo echo ERROR: $* >> LARBS.log) ;} + +#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 ;} + +#aurcheck runs on each of its arguments, if the argument is not already installed, it either uses packer to install it, or installs it manually. +aurcheck() { +qm=$(pacman -Qm | awk '{print $1}') +for arg in "$@" +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 + +fi +done +} + +blue Changing directory to /home/$USER... +cd /home/$USER || red Could not cd to /home/$USER. Does user and home directory exist? + +blue Installing AUR programs... + +blue \(This may take some time.\) + +#Add the needed gpg key for neomutt +gpg --recv-keys 5FAF0A6EE7371805 + +aurcheck packer i3-gaps vim-pathogen neofetch tamzen-font-git neomutt unclutter-xfixes-git urxvt-resize-font-git polybar-git python-pywal xfce-theme-blackbird || red Error with basic AUR installations... +#Also installing i3lock, since i3-gaps was only just now installed. +sudo pacman -S --noconfirm --needed i3lock + +#packer --noconfirm -S ncpamixer-git speedometer cli-visualizer + +choices=$(cat .choices) +for choice in $choices +do + case $choice in + 1) + aurcheck vim-live-latex-preview + git clone https://github.com/lukesmithxyz/latex-templates.git && mkdir -p /home/$USER/Documents/LaTeX && rsync -va latex-templates /home/$USER/Documents/LaTeX && rm -rf latex-templates + ;; + 6) + aurcheck ttf-ancient-fonts + ;; + 7) + aurcheck transmission-remote-cli-git + ;; + esac +done +browsers=$(cat .browch) +for choice in $browsers +do + case $choice in + 3) + gpg --recv-keys 865E6C87C65285EC + aurcheck palemoon-bin + ;; + 4) + aurcheck waterfox-bin + ;; + esac +done diff --git a/old/install_packages.sh b/old/install_packages.sh @@ -0,0 +1,109 @@ +#!/bin/bash +blue() { printf "\033[0;34m $* \033[0m\n" && (chmod 777 LARBS.log && echo $* >> LARBS.log) ;} +red() { printf "\033[0;31m $* \033[0m\n" && (chmod 777 LARBS.log && echo ERROR: $* >> LARBS.log) ;} +sudo pacman -S --noconfirm 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) + +error() { dialog --title "Error!" --msgbox "We've run into a fatal-ish error. Check the LARBS.log file for more information" 10 60 && clear && exit ;} + +cmd=(dialog --separate-output --checklist "Select additional packages to install with <SPACE>:" 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 + ) +choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty) +rm -f /home/$USER/.choices #Needed if write protected from root script. +echo $choices > /home/$USER/.choices +chmod 777 /home/$USER/.choices +clear + +brow=(dialog --separate-output --checklist "Select a browser (none or multiple possible):" 22 76 16) +options=(1 "qutebrowser" off # any option can be set to default to "on" + 2 "Firefox" off + 3 "Palemoon" off + 4 "Waterfox" off + ) +browch=$("${brow[@]}" "${options[@]}" 2>&1 >/dev/tty) +rm -f /home/$USER/.browch #Needed if write protected from root script. +echo $browch > /home/$USER/.browch +chmod 777 /home/$USER/.browch +clear + +#If this is the first run, install all core programs. +if [[ -e .firstrun ]] +then + 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'll can relax even more with your complete system.\n\nNow just press <OK> and the system will begin installation!" 13 60 + blue Now installing main programs... + sudo pacman --noconfirm --needed -S base-devel xorg-xinit xorg-server rxvt-unicode feh ffmpeg pulseaudio pulseaudio-alsa arandr pavucontrol pamixer mpv wget rofi vim w3m ranger mediainfo poppler highlight tmux calcurse htop newsbeuter mpd mpc ncmpcpp network-manager-applet networkmanager imagemagick atool libcaca compton transset-df markdown mupdf evince rsync git youtube-dl youtube-viewer cups screenfetch scrot unzip unrar ntfs-3g offlineimap msmtp notmuch notmuch-mutt dosfstools fzf r pandoc || (red Error installing basic packages. Check your internet connection and pacman keyring.) +else + dialog --no-cancel --inputbox "Input the name of a non-root user to install AUR packages as." 10 60 2> .name +fi + +for choice in $choices +do + case $choice in + 1) + blue Now installing LaTeX packages... + sudo pacman --noconfirm --needed -S texlive-most texlive-lang biber + ;; + 2) + blue Now installing LibreOffice Suite... + sudo pacman --noconfirm --needed -S libreoffice-fresh + ;; + 3) + blue Now installing GIMP... + sudo pacman --noconfirm --needed -S gimp + ;; + 4) + blue Now installing Blender... + sudo pacman --noconfirm --needed -S blender + ;; + 5) + blue Now installing Emacs... + sudo pacman --noconfirm --needed -S emacs + ;; + 6) + blue Now installing extra fonts... + sudo pacman --noconfirm --needed -S noto-fonts-cjk noto-fonts-emoji + ;; + 7) + blue Now installing transmission... + sudo pacman --noconfirm --needed -S transmission-cli + esac +done + +for choice in $browch +do + case $choice in + 1) + blue Now installing qutebrowser... + sudo pacman --noconfirm --needed -S qutebrowser gst-libav gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly + ;; + 2) + blue Now installing Firefox... + sudo pacman --noconfirm --needed -S firefox + ;; + esac +done + +#Packages I may later add: +#pacman --noconfirm --needed -S projectm-pulseaudio + +if [[ -e .firstrun ]] +then + USER=$(cat .firstrun) + blue Downloading next portion of the script \(user.sh\)... + curl https://raw.githubusercontent.com/LukeSmithxyz/larbs/master/user.sh > /home/$USER/user.sh && blue Running user.sh script as $USER... + sudo -u $USER bash /home/$USER/user.sh || red Error when running user.sh... + rm -f /home/$USER/user.sh +else + USER=$(cat .name) || red Could not retreive username... + blue Downloading next portion of the script \(aur_packages.sh\)... + curl https://raw.githubusercontent.com/LukeSmithxyz/larbs/master/aur_packages.sh > /home/$USER/aur_packages.sh && blue Running aur_packages as $USER... + sudo -u $USER bash /home/$USER/aur_packages.sh || red Error when running aur_packages... + rm -f /home/$USER/aur_packages.sh +fi +rm .firstrun diff --git a/old/new_user.sh b/old/new_user.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +blue() { printf "\033[0;34m $* \033[0m\n" && (echo $* >> LARBS.log) ;} +red() { printf "\033[0;31m $* \033[0m\n" && (echo ERROR: $* >> LARBS.log) ;} + +USER=$(cat .firstrun) +blue Changing directory to /home/$USER... + +cd /home/$USER + +blue Activating Pulseaudio if not already active... +pulseaudio --start && blue Pulseaudio enabled... + +curl -O http://lukesmith.xyz/larbs/aur_install.sh && bash aur_install.sh +rm aur_install.sh + +blue Downloading config files... +git clone https://github.com/lukesmithxyz/voidrice.git && rsync -va voidrice/ /home/$USER && rm -rf voidrice + +blue Generating bash/ranger/qutebrowser shortcuts... +python ~/.config/Scripts/shortcuts.py diff --git a/old/one.sh b/old/one.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +#This is a lazy script I have for auto-installing Arch. +#It's not officially part of LARBS, but I use it for testing. +#DO NOT RUN THIS YOURSELF because Step 1 is it reformatting /dev/sda WITHOUT confirmation, +#which means RIP in peace qq your data unless you've already backed up all of your drive. + +pacman -S --noconfirm 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) +RED='\033[0;31m' +BLUE='\033[0;34m' +NC='\033[0m' + +#error() { dialog --title "Error!" --msgbox "We've run into a fatal-ish error. Check the LARBS.log file for more information" 10 60 && clear && exit ;} + +dialog --defaultno --title "DON'T BE A BRAINLET!" --yesno "This is an Arch install script that is very rough around the edges.\n\nOnly run this script if you're a big-brane who doesn't mind deleting your entire /dev/sda drive.\n\nThis script is only really for me so I can autoinstall Arch.\n\nt. Luke" 15 60 || exit + +dialog --defaultno --title "DON'T BE A BRAINLET!" --yesno "Do you think I'm meming? Only select yes to DELET your entire /dev/sda and reinstall Arch.\n\nTo stop this script, press no." 10 60 || exit + +dialog --no-cancel --inputbox "Enter a name for your computer." 10 60 2> comp + +timedatectl set-ntp true + +cat <<EOF | fdisk /dev/sda +o +n +p + + + +EOF +partprobe + +mkfs.ext4 /dev/sda1 +mount /dev/sda1 /mnt + +pacstrap /mnt base base-devel + +genfstab -U /mnt >> /mnt/etc/fstab + +curl http://lukesmith.xyz/larbs/chroot.sh > /mnt/chroot.sh && arch-chroot /mnt bash chroot.sh && rm /mnt/chroot.sh + +cat comp > /mnt/etc/hostname && rm comp + +dialog --defaultno --title "Final Qs" --yesno "Eject CD/ROM (if any)?" 5 30 && eject +dialog --defaultno --title "Final Qs" --yesno "Reboot computer?" 5 30 && reboot +dialog --defaultno --title "Final Qs" --yesno "Return to chroot environment?" 6 30 && arch-chroot /mnt +clear diff --git a/old/root.sh b/old/root.sh @@ -0,0 +1,41 @@ +#!/bin/bash +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) +RED='\033[0;31m' +BLUE='\033[0;34m' +NC='\033[0m' + +error() { dialog --title "Error!" --msgbox "We've run into a fatal-ish error. Check the LARBS.log file for more information" 10 60 && clear && 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> name +dialog --no-cancel --passwordbox "Enter a password for that user." 10 60 2> pass1 +dialog --no-cancel --passwordbox "Reype password." 10 60 2> pass2 + +while [ $(cat pass1) != $(cat pass2) ] +do + dialog --no-cancel --passwordbox "Passwords do not match.\n\nEnter password again." 10 60 2> pass1 + dialog --no-cancel --passwordbox "Reype password." 10 60 2> pass2 +done + +USER=$(cat name) +useradd -m -g wheel -s /bin/bash $USER + +echo "$USER:$(cat pass1)" | chpasswd +#I shred the password for safety's sake. +shred -u pass1 +shred -u pass2 + +echo $USER > .firstrun +curl -O http://lukesmith.xyz/larbs/install_packages.sh && bash install_packages.sh +rm .firstrun + +printf "${BLUE}Enabling Network Manager...\n${NC}" +systemctl enable NetworkManager +systemctl start NetworkManager + + +curl https://raw.githubusercontent.com/LukeSmithxyz/larbs/master/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 +clear diff --git a/old/user.sh b/old/user.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +blue() { printf "\033[0;34m $* \033[0m\n" && (echo $* >> LARBS.log) ;} +red() { printf "\033[0;31m $* \033[0m\n" && (echo ERROR: $* >> LARBS.log) ;} + +USER=$(cat .firstrun) +blue Changing directory to /home/$USER... + +cd /home/$USER + +blue Activating Pulseaudio if not already active... +pulseaudio --start && blue Pulseaudio enabled... + +curl -O http://lukesmith.xyz/larbs/aur_install.sh && bash aur_install.sh +rm aur_install.sh + +blue Downloading config files... +git clone https://github.com/lukesmithxyz/voidrice.git && rsync -va voidrice/ /home/$USER && rm -rf voidrice + +blue Generating bash/ranger/qutebrowser shortcuts... +python ~/.config/Scripts/shortcuts.py diff --git a/pix/arch.jpg b/pix/arch.jpg Binary files differ. diff --git a/pix/arch.png b/pix/arch.png Binary files differ. diff --git a/pix/autism.jpg b/pix/autism.jpg Binary files differ. diff --git a/pix/faveicon.ico b/pix/faveicon.ico Binary files differ. diff --git a/pix/gnu-linux.jpg b/pix/gnu-linux.jpg Binary files differ. diff --git a/pix/i3.jpg b/pix/i3.jpg Binary files differ. diff --git a/pix/larbs.jpg b/pix/larbs.jpg Binary files differ. diff --git a/pix/vim.jpg b/pix/vim.jpg Binary files differ. diff --git a/style.css b/style.css @@ -0,0 +1,25 @@ +html{padding-bottom: 450px;} +body{margin:40px auto;max-width:650px;line-height:1.6;font-size:18px;color:#333;padding:0 +10px} + +caption { + font-size: small; +} + +table { + margin: 0px auto; +} + +h1,h2,h3,h4{text-align:center;line-height:1.2} + +footer img { + max-height: 75px; + vertical-align: middle; + padding: 10px; +} + +footer { + font-size: xx-large; + font-weight: bold; + text-align: center; + }