HOME=/home/nathan mkdirs() { for DIR do if [ ! -d $HOME/$DIR ]; then sudo -H -u nathan bash -c "mkdir -p $HOME/$DIR" fi done } # Create directories mkdirs documents/ downloads/ media/ pictures/wallpapers recordings/ sudo -H -u nathan bash -c 'touch $HOME/recordings/.recording_status' # Temp, so startx works echo "exec dwm" > $HOME/.xinitrc # Set location to download source code and other repos REPO=$HOME/agitrepo sudo -H -u nathan bash -c "mkdir $REPO" # Suckless installs # dwm #sudo -H -u nathan bash -c "git clone https://git.suckless.org/dwm $REPO/adwm" sudo -H -u nathan bash -c "git clone ssh://git@alphavps.aney.co.uk:2020/srv/git/suckless/dwm.git $REPO/adwm" cd $REPO/adwm/ make clean install # st terminal #sudo -H -u nathan bash -c "git clone https://git.suckless.org/st $REPO/ast" sudo -H -u nathan bash -c "git clone ssh://git@alphavps.aney.co.uk:2020/srv/git/suckless/st.git $REPO/ast" cd $REPO/ast/ make clean install # dmenu launcher sudo -H -u nathan bash -c "git clone https://git.suckless.org/dmenu $REPO/admenu" cd $REPO/admenu/ make clean install # slstatus #sudo -H -u nathan bash -c "git clone https://git.suckless.org/slstatus $REPO/aslstatus" sudo -H -u nathan bash -c "git clone ssh://git@alphavps.aney.co.uk:2020/srv/git/suckless/slstatus.git $REPO/aslstatus" cd $REPO/aslstatus/ make clean install # Setup the bin directory for custom scripts sudo -H -u nathan bash -c "mkdir $HOME/.local/bin" # Vi mode terminal and local bin # This also happens in dotfiles, so kinda redundant echo "set -o vi\nexport PATH=\$HOME/.local/bin:\$PATH" >> $HOME/.zshrc echo "export PATH=\$HOME/.local/bin/*:\$PATH" >> $HOME/.zshrc # Add to path for this session export PATH=\$HOME/.local/bin/:$PATH export PATH=\$HOME/.local/bin/dmenu:$PATH # Muh scripties sudo -H -u nathan bash -c "git clone https://github.com/aney/scripts $REPO/ascripts" # create a sym link. Will change to cp if others start using my install.sh ln -s $REPO/ascripts/dmenu/ $HOME/.local/bin/ ln -s $REPO/ascripts/config/ $HOME/.local/bin/ ln -s $REPO/ascripts/backup/ $HOME/.local/bin/ # dotfiles # This will overwrite existing dotfiles... #sudo -H -u nathan bash -c "git clone https://github.com/aney/dotfiles $REPO/adotfiles/" sudo -H -u nathan bash -c "git clone ssh://git@alphavps.aney.co.uk:2020/srv/git/dotfiles.git $REPO/adotfiles" ln -s $REPO/adotfiles/.[^.]* $HOME