diff --git a/.gitignore b/.gitignore index 2c85660..6a97bf3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ files/Laptop/ files/Desktop/ files/Laptop.zip files/Desktop.zip +files/Laptop.7z +files/Desktop.7z diff --git a/auto_move.sh b/auto_move.sh index 00a5319..386be64 100644 --- a/auto_move.sh +++ b/auto_move.sh @@ -1,25 +1,39 @@ +# Set vars LOC=$1 LOCAL_USER=$2 -7z x $LOC -o./files/temp/$LOCAL_USER/ +# unarchive your files +7z x $LOC -o./files/temp/ +# try staging laptop stuff, if that fails do desktop stuff +mv ./files/temp/Laptop ./files/temp/$LOCAL_USER/ ||\ +mv ./files/temp/Desktop ./files/temp/$LOCAL_USER/ + +# copy the files to where theyre supposed to go on the system cp -vR ./files/temp/$LOCAL_USER/* /home/$LOCAL_USER/ - -echo "Hit ENTER when files finish transferring..." - -neofetch - +# change ownership of the user's stuff so you dont have privilege issues chown -R $LOCAL_USER /home/$LOCAL_USER chgrp -R $LOCAL_USER /home/$LOCAL_USER +# make neofetch config folders +mkdir ~/.config +mkdir ~/.config/neofetch + +# delete any default configs in root so that they can be set properly rm ~/.zshrc rm ~/.config/neofetch/config.conf rm ~/.gitconfig -ln -s /home/$LOCAL_USER/.zshrc ~/.zshrc +# link some stuff do the unpriv users' stuff +# NOTE: The way I was linking zshrc is potentially dangerous since it would allow for priv esc from the unpriv user to +# root privilege. Don't do this. It is dumb lol. +# ln -s /home/$LOCAL_USER/.zshrc ~/.zshrc +# As far as I know the config files dont run code, so its safe to link them so they will auto update if you change them as your normal user +cp /home/$LOCAL_USER/.zshrc ~/.zshrc ln -s /home/$LOCAL_USER/.config/neofetch/config.conf ~/.config/neofetch/config.conf ln -s /home/$LOCAL_USER/.gitconfig ~/.gitconfig +# add my bashrc additions to root and the local user echo `cat ./files/.bashrc` >> /home/$LOCAL_USER/.bashrc echo `cat ./files/.bashrc` >> ~/.bashrc \ No newline at end of file diff --git a/desktop_install.sh b/desktop_install.sh index 67ce38f..c06f08b 100644 --- a/desktop_install.sh +++ b/desktop_install.sh @@ -1,6 +1,11 @@ -LOC="./.auto-install" -git clone https://gitea.voxelvortex.tk:443/voxelvortex/InstaTout.git $LOC +LOC=$1 +if [ -z "$1" ] + then + LOC="./.auto-install" +fi + +git clone https://gitea.voxelvortex.tk:443/voxelvortex/InstaTout.git $LOC # Install all the generic programs $LOC/program_install.sh diff --git a/finalize.sh b/finalize.sh index 5a4ff55..2fc5141 100644 --- a/finalize.sh +++ b/finalize.sh @@ -1,8 +1,10 @@ # unprivileged user's name, change this if it isnt right -USER="michael" +LOCAL_USER="michael" +# change default shells for root and unpriv-user to zsh usermod --shell /bin/zsh root -usermod --shell /bin/zsh $USER +usermod --shell /bin/zsh $LOCAL_USER +#usermod -aG sudo $USER # List gnome extensions to install echo -e "\nGnome extensions:" @@ -13,4 +15,5 @@ echo -e "\tRemovable Drive Menu: https://extensions.gnome.org/extension/7/remova echo -e "\tTactile: https://extensions.gnome.org/extension/4548/tactile/" echo -e "\tVitals: https://extensions.gnome.org/extension/1460/vitals/" echo -e "\tWorkspace Indicator: https://extensions.gnome.org/extension/21/workspace-indicator/" -echo -e "\thttps://extensions.gnome.org/extension/595/autohide-battery/" +echo -e "\tAutohide Battery: https://extensions.gnome.org/extension/595/autohide-battery/" +echo -e "\tSound Input & Output Device Chooser: https://extensions.gnome.org/extension/906/sound-output-device-chooser/" diff --git a/gnome_install.sh b/gnome_install.sh index 8f70e74..238e157 100644 --- a/gnome_install.sh +++ b/gnome_install.sh @@ -6,6 +6,8 @@ cp ./files/preferences /etc/apt/preferences apt-get update &&\ apt -t unstable install -y gnome-session gnome-shell gnome-backgrounds gnome-applets gnome-control-center mutter gjs gnome-core gnome-tweaks libc6-i386 libgl1 libglx0 libglx-mesa0 power-profiles-daemon -gsettings set org.gnome.shell.overrides workspaces-only-on-primary false +# Make all the monitors swap workspaces together (WHY THE FUCK ISNT THIS DEFAULT GNOME? BRUH.) +gsettings set org.gnome.mutter workspaces-only-on-primary false + echo "gnome installed" \ No newline at end of file diff --git a/laptop_install.sh b/laptop_install.sh index 6d418fa..d8142e8 100644 --- a/laptop_install.sh +++ b/laptop_install.sh @@ -1,15 +1,22 @@ -LOC="./.auto-install" +LOC=$1 + +if [ -z "$1" ] + then + LOC="./.auto-install" +fi + git clone https://gitea.voxelvortex.tk:443/voxelvortex/InstaTout.git $LOC +# Install all the generic programs $LOC/program_install.sh +# Make sure all the packages I want for my laptop are installed apt-get update &&\ apt-get install -y ungoogled-chromium librewolf code python3 python3-pip python3-wheel docker-compose docker.io zsh gdb p7zip-full git iputils-* dnsutils net-tools ffmpeg htop nano vim neovim nmap ncat ssh tree vlc snapd audacity filezilla # install laptop utils via tasksel tasksel install laptop - # Point to Fprint driver echo -e "\n\nFigerprint\n\tCheck out: https://gist.github.com/d-k-bo/15e53eab53e2845e97746f5f8661b224"