Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 172 lines (143 sloc) 6.11 KB
#! /bin/bash
scriptNotify(){
echo ""
echo "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀"
echo " $1"
echo "▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄"
echo ""
}
read -p "user name: " sn
if [[ -z "$sn" || ! -d /home/$sn ]]; then
echo "invalid user - exitting!"
exit 0
fi
rundir=$(pwd)
home=/home/$sn
repos=$home/Repositories
dotfilesRoot=$repos/dotfiles
git config --global user.email "erik.j.thorne@gmail.com"
git config --global user.name "Erik Thorne"
scriptNotify "create expected directories"
mkdir -p $home/.screenlayout
mkdir $repos/Leech
mkdir -p $home/.config/ranger
mkdir -p $home/.themes
mkdir -p $home/.icons
mkdir -p $home/.config/powerline/config
scriptNotify "updating system with aptitude"
sudo apt-get -y update && sudo apt-get dist-upgrade
scriptNotify "generating new ssh key"
read -p "proceed? [y/n] " doGenSshKey
doGenSshKey=$(echo $doGenSshKey | sed -e 's/\(.*\)/\L\1/') # make answer lowercase
while [[ "$doGenSshKey" != "y" && "$doGenSshKey" != "n" ]]; do
read -p "yes or no plz [y/n] " doGenSshKey
doGenSshKey=$(echo $doGenSshKey | sed -e 's/\(.*\)/\L\1/') # make answer lowercase
done
if [[ "$doGenSshKey" == "y" ]]; then
ssh-keygen -t rsa -b 4096
ssh-add ~/.ssh/id_rsa
read -p "please register new ssh key with github"
else
echo "skipping ssh key generation"
fi
echo ""
read -p "please import gpg keys using \"gpg --import\""
read -p "did you trust that gpg key? run \"gpg --edit me@example\" and \"trust\""
scriptNotify "adding apt repos"
sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"
sudo add-apt-repository ppa:kgilmer/speed-ricer
# install various dependencies
scriptNotify "updating apt and installing lots of shit"
sudo apt-get -y update
sudo apt-get -y install arandr adobe-flashplugin \
browser-plugin-freshplayer-pepperflash \
compton curl conky \
exuberant-ctags \
feh \
fonts-symbola \
git gnome-tweak-tool gtk-chtheme \
htop \
i3-gaps \
lxappearance \
mycli \
network-manager-openvpn-gnome notify-osd \
pass powerline \
qt4-qtconfig \
ranger rofi \
silversearcher-ag scrot \
tig \
vim-gnome vlc\
xclip \
zathura
scriptNotify "setting up polybar"
./install-polybar.sh
scriptNotify "setting up password repository"
mkdir $home/.password-store
cd $home/.password-store
git clone git@github.com:ethorne/passwords.git .
scriptNotify "setting up powerline fonts"
baseUrl="https://github.com/powerline/fonts/raw/master/LiberationMono/Literation%20Mono%20Powerline"
cd $home
mkdir .fonts
wget $baseUrl.ttf -O ~/.fonts/Liberation\ Mono\ Powerline.ttf
wget $baseUrl%20Bold.ttf -O ~/.fonts/Liberation\ Mono\ Powerline\ Bold.ttf
wget $baseUrl%20Italic.ttf -O ~/.fonts/Liberation\ Mono\ Powerline\ Italic.ttf
wget $baseUrl%20Bold%20Italic.ttf -O ~/.fonts/Liberation\ Mono\ Powerline\ Bold\ Italic.ttf
fc-cache -vf $home/.fonts
scriptNotify "cloning useful repos"
cd $repos
git clone https://github.com/ethorne/xrandr-ncurses
cd Leech
git clone git@github.com:metalelf0/gnome-terminal-colors.git
git clone https://github.com/VundleVim/Vundle.vim.git $home/.vim/bundle/Vundle.vim
scriptNotify "installing Luke's st"
git clone git@github.com:LukeSmithxyz/st.git
cd st && sudo make install
scriptNotify "installing fzf"
git clone --depth 1 https://github.com/junegunn/fzf.git $home/.fzf
cd $home/.fzf
./install
scriptNofigy "installing adsf"
git clone https://github.com/asdf-vm/asdf.git $home/.asdf
cd $home/.asdf
git checkout "$(git describe --abbrev=0 --tags)"
# install packages for plugins
# some of these are redudundant
# they are listed as such so that removing asdf from this script is
# not a nightmare (if that ever comes to pass)
sudo apt-get -y install \
automake autoconf libreadline-dev \
libncurses-dev libssl-dev libyaml-dev \
libxslt-dev libffi-dev libtool unixodbc-dev \
unzip curl
scriptNotify "adding generic user group"
sudo groupadd generic
scriptNotify "adding current user to generic user group"
sudo usermod -a -G generic $sn
scriptNotify "setting up vpn"
cd $home/Desktop
wget https://www.privateinternetaccess.com/installer/pia-nm.sh
chmod +x pia-nm.sh
sudo ./pia-nm.sh
rm pia-nm.sh
scriptNotify "making symbolic links for dotfiles"
$dotfilesRoot/links.sh
scriptNotify "installing vim plugins"
vim $home/.vimrc +PluginInstall
# if these two tar extractions fail, its cuz you have to manually click the DL
# button on that page... so it's downloading an HTML file, not an archive
scriptNotify "installing themes and icons"
cd $home/.themes
wget -O theme.tar.xz 'https://www.gnome-look.org/p/1246387/startdownload?file_id=1535439087&file_name=Ultimate-Dark-Blue.tar.xz&file_type=application/x-xz&file_size=272880&url=https%3A%2F%2Fdl.opendesktop.org%2Fapi%2Ffiles%2Fdownload%2Fid%2F1535439087%2Fs%2F8bb3dc13a480285fb64dfee1066c3a3a%2Ft%2F1535487646%2Fu%2F%2FUltimate-Dark-Blue.tar.xz'
tar -xvf theme.tar.xz
rm theme.tar.xz
wget -O icon.tar.xz 'https://www.opendesktop.org/p/1218961/startdownload?file_id=1535264841&file_name=Blue-Maia.tar.xz&file_type=application/x-xz&file_size=1423552&url=https%3A%2F%2Fdl.opendesktop.org%2Fapi%2Ffiles%2Fdownload%2Fid%2F1535264841%2Fs%2Fa13114021a9c0ba69a782daf690d335f%2Ft%2F1535488564%2Fu%2F%2FBlue-Maia.tar.xz'
tar -xvf icon.tar.xz
rm icon.tar.xz
scriptNotify "modifying permissions for blight"
for k in /sys/class/backlight/*
do
sudo /bin/chgrp generic $k/brightness && sudo /bin/chmod g+w $k/brightness
done
sudo cp $dotfilesRoot/etc_udev_rules.d/666-backlight.rules /etc/udev/rules.d
scriptNotify "read the README.md for a few manual steps"
You can’t perform that action at this time.