2017-10-07 22:09:18 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#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.
|
2018-01-18 06:21:52 +00:00
|
|
|
else
|
2018-03-03 05:07:00 +00:00
|
|
|
echo $arg not installed.
|
2018-03-11 01:06:15 +00:00
|
|
|
packer --noconfirm -S $arg >/dev/null || aurinstall $arg
|
2017-10-07 22:09:18 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2018-03-03 05:07:00 +00:00
|
|
|
dialog --infobox "Installing \"packer\", an AUR helper..." 10 60
|
2018-03-03 05:08:00 +00:00
|
|
|
aurcheck packer >/dev/null
|
2018-01-18 06:21:52 +00:00
|
|
|
|
2018-03-03 05:07:00 +00:00
|
|
|
count=$(cat /tmp/aur_queue | wc -l)
|
|
|
|
n=0
|
2017-10-07 22:09:18 +00:00
|
|
|
|
2018-03-03 05:07:00 +00:00
|
|
|
for prog in $(cat /tmp/aur_queue)
|
2017-10-07 22:09:18 +00:00
|
|
|
do
|
2018-03-03 05:07:00 +00:00
|
|
|
n=$((n+1))
|
|
|
|
dialog --infobox "Downloading and installing program $n out of $count: $prog..." 10 60
|
2018-03-03 05:08:00 +00:00
|
|
|
aurcheck $prog >/dev/null
|
2017-10-07 22:09:18 +00:00
|
|
|
done
|
|
|
|
|
2018-07-07 06:18:03 +00:00
|
|
|
dialog --infobox "Downloading and installing config files..." 4 60
|
2018-06-09 12:19:18 +00:00
|
|
|
git clone --depth 1 https://github.com/lukesmithxyz/voidrice.git >/dev/null &&
|
2018-03-03 05:08:00 +00:00
|
|
|
rsync -va voidrice/ /home/$(whoami) >/dev/null &&
|
|
|
|
rm -rf voidrice >/dev/null
|
2018-02-14 00:36:37 +00:00
|
|
|
|
2018-07-07 06:18:03 +00:00
|
|
|
dialog --infobox "Readying mutt-wizard..." 4 60
|
2018-06-09 12:19:18 +00:00
|
|
|
git clone --depth 1 https://github.com/lukesmithxyz/mutt-wizard.git /home/$(whoami)/.config/mutt >/dev/null
|
2018-01-20 22:27:11 +00:00
|
|
|
|
2018-03-03 05:07:00 +00:00
|
|
|
dialog --infobox "Generating bash/ranger/qutebrowser shortcuts..." 4 60
|
2018-06-09 12:19:18 +00:00
|
|
|
git clone --depth 1 https://github.com/LukeSmithxyz/shortcut-sync.git >/dev/null &&
|
2018-03-03 05:08:00 +00:00
|
|
|
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
|
2018-02-21 04:24:24 +00:00
|
|
|
|
2018-07-07 06:15:54 +00:00
|
|
|
dialog --infobox "Creating LARBS Firefox profile..." 4 60
|
|
|
|
git clone --depth 1 https://github.com/LukeSmithxyz/mozilla-larbs.git >/dev/null &&
|
|
|
|
rsync -r mozilla-larbs/firefox/larbs.default ~/.mozilla/firefox/ &&
|
|
|
|
rsync mozilla-larbs/firefox/profiles.ini ~/.mozilla/firefox/
|
|
|
|
|
2018-03-03 05:07:00 +00:00
|
|
|
dialog --infobox "Preparing welcome message..." 4 50
|
2018-04-23 02:03:18 +00:00
|
|
|
|
|
|
|
echo "exec_always --no-startup-id notify-send -i ~/.scripts/larbs.png '<b>Welcome to LARBS:</b> Press Super+F1 for the manual.' -t 10000" >> /home/$(whoami)/.config/i3/config
|
2018-02-25 22:58:45 +00:00
|
|
|
|
2018-03-03 05:07:00 +00:00
|
|
|
dialog --infobox "Reseting Pulseaudio..." 4 50
|
2018-03-03 05:08:00 +00:00
|
|
|
killall pulseaudio >/dev/null
|
|
|
|
pulseaudio --start >/dev/null
|