diff --git a/setup-chromium.sh b/setup-chromium.sh new file mode 100755 index 0000000000000000000000000000000000000000..307dac9fb51f55cbbf75b979fd4444ba3eb460bb --- /dev/null +++ b/setup-chromium.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +# Function to install and update extensions using NeverDecaf's extension +install_update_extension() { + # Set chrome://flags/#extension-mime-request-handling to Always prompt for install and relaunch + echo "Setting chrome://flags/#extension-mime-request-handling to Always prompt for install and relaunch..." + # Command to set the flag (you may need to adjust this based on the specific method NeverDecaf uses) + # Example: + # command_to_set_flag_here + + # Backup the Chrome flags file + cp ~/.config/chromium/Default/Preferences ~/.config/chromium/Default/Preferences.bak + + # Set the flag to 'Always prompt for install and relaunch' + sed -i 's/"extension-mime-request-handling":.*/"extension-mime-request-handling":"Always prompt for install and relaunch",/' ~/.config/chromium/Default/Preferences + + # Download and install the latest extension + echo "Downloading and installing the latest extension..." + # Command to download and install the extension (you may need to adjust this based on the specific method NeverDecaf uses) + # Example: + # wget -O /path/to/extension.crx https://example.com/latest_extension.crx + + # Additional steps for extension update if needed +} + +# Function to enable spellcheck +enable_spellcheck() { + # Download the bdic file for the desired language + echo "Downloading the bdic file for the desired language..." + # Command to download the bdic file (you may need to adjust this based on the specific method) + # Example: + # wget -O bdic_file.txt https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries/+/main/en-US-10-1.bdic?format=TEXT + + # Decode the bdic file + echo "Decoding the bdic file..." + base64 -d bdic_file.txt > bdic_file.bdic + + # Move the bdic file to the Dictionaries directory + echo "Moving the bdic file to the Dictionaries directory..." + # Command to move the bdic file to the Dictionaries directory (you may need to adjust this based on your operating system) + # Example: + # mv bdic_file.bdic ~/.config/chromium/Dictionaries/ + + # Toggle spell check in chrome://settings/languages + echo "Toggle spell check in chrome://settings/languages..." + # Additional steps to toggle spell check (you may need to adjust this based on your specific browser) +} + +# Main script +echo "Starting setup of ungoogled chromium..." + +# Call functions to install and update extensions and enable spellcheck +install_update_extension +enable_spellcheck + +echo "Setup complete." diff --git a/setup.sh b/setup.sh index bb0d83c01b14e3d7436d42c6e32c00f34347f02b..567b76795ac59d7865c4dfb68a507aa0f2525323 100755 --- a/setup.sh +++ b/setup.sh @@ -42,19 +42,31 @@ if [ "$distro" == "Debian" ]; then echo 'Even bloated ones ? y or n' read yn if [ "$yn"== 'y' ]; then - sudo apt install chromium thunderbird libreoffice pandoc texlive-full + sudo apt install thunderbird libreoffice pandoc texlive-full fi sudo apt purge gnome-games sudo systemctl enable --now NetworkManager && echo 'Enabled Network Manager' + + echo 'Install Ungoogled Chromium (it will install flatpack) ? (y or n)' + read yn + if [ "$yn" == 'y' ]; then + # Download and install VS Code + sudo apt install flatpak + flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo + flatpak install flathub com.github.Eloston.UngoogledChromium + fi + echo 'Install VS Code? (y or n)' read yn if [ "$yn" == 'y' ]; then + # Install the depedencies + sudo apt install gnupg2 software-properties-common apt-transport-https curl -y + # Import the Microsoft GPG key using the following curl command + curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - # 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 + sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" + sudo apt update && sudo apt install code -y fi echo 'Install Mullvad VPN? (y or n)' @@ -73,7 +85,7 @@ if [ "$distro" == "Debian" ]; then echo 'Setup Arkenfox user.js ? (y or n)' read yn if [ "$yn" == 'y' ]; then - sudo apt install firefox-esr + sudo apt install firefox-esr curl curl -o user.js https://raw.githubusercontent.com/arkenfox/user.js/master/user.js # Disable letterboxing