diff --git a/setup.sh b/setup.sh index 8a6ddc28c48b9a80a97261d6401ff1e22e5a4f7e..9fe878b3ab88f217faabd11780a02c967dd685d4 100755 --- a/setup.sh +++ b/setup.sh @@ -42,19 +42,48 @@ if [ "$distro" == "Debian" ]; then sudo apt purge gnome-games sudo systemctl enable --now NetworkManager && echo 'Enabled Network Manager' - echo 'Install VScode ? (y or n)' - read yn - if [ "$yn" == 'y' ]; then - # vscode - curl https://go.microsoft.com/fwlink/?LinkID=760868 && sudo apt install ./code*.deb - fi - - echo 'Install Mullvad vpn ? (y or n)' - read yn - if [ "$yn" == 'y' ]; then - # vscode - curl https://mullvad.net/download/app/deb/latest/ && sudo apt install ./Mullvad*.deb && sudo systemctl enable --now mullvad-daemon - fi + echo 'Install VS Code? (y or n)' + read yn + if [ "$yn" == 'y' ]; then + # Download and install VS Code + curl https://go.microsoft.com/fwlink/?LinkID=760868 -o ~/Downloads/code.deb && sudo apt install ~/Downloads/code.deb + + # Clean up the downloaded deb file + rm ~/Downloads/code.deb + fi + + echo 'Install Mullvad VPN? (y or n)' + read yn + if [ "$yn" == 'y' ]; then + # Download and install Mullvad VPN + curl https://mullvad.net/download/app/deb/latest/ -o ~/Downloads/mullvad.deb && sudo apt install ~/Downloads/mullvad.deb + + # Enable and start Mullvad daemon + sudo systemctl enable --now mullvad-daemon + + # Clean up the downloaded deb file + rm ~/Downloads/mullvad.deb + fi + + echo 'Setup Arkenfox user.js ? (y or n)' + read yn + if [ "$yn" == 'y' ]; then + sudo apt install firefox-esr + curl -o user.js https://raw.githubusercontent.com/arkenfox/user.js/master/user.js + + # Disable letterboxing + sed -i 's/user_pref("privacy.resistFingerprinting.letterboxing", true);/user_pref("privacy.resistFingerprinting.letterboxing", false);/' user.js + + # Enable keyword.enabled preference + sed -i 's/user_pref("keyword.enabled", false);/user_pref("keyword.enabled", true);/' user.js + + # Move user.js to Firefox profile directory with most files in it + most_files_dir=$(find ~/.mozilla/firefox/ -maxdepth 1 -type d -name '*.default*' -exec sh -c 'echo "{} $(ls -1 "{}" | wc -l)"' \; | sort -k 2 -n -r | head -n1 | cut -d" " -f1) + mv user.js "${most_files_dir}/user.js" + + echo "Arkenfox user.js file applied with letterboxing disabled and keyword.enabled preference set to true." + + fi fi