Upload files to "/"

This commit is contained in:
Tsugu 2025-01-17 13:30:39 +01:00
parent dd9b105aa8
commit c79d973588
5 changed files with 608 additions and 0 deletions

99
tsubuntu.sh Normal file
View file

@ -0,0 +1,99 @@
#!/bin/bash
# For Ubuntu 24.10, 24.04, 22.04, 20.04, Debian 12, and Fedora 40/41
repo="https://raw.githubusercontent.com/Tsu-gu/tsubuntu/main"
rhel_version=$(awk -F'=' '/^VERSION_ID/ {gsub(/"/, "", $2); split($2, a, "."); print a[1]}' /etc/os-release)
OS_SUSE=$(awk -F'=' '/^ID=/ {gsub(/"/, "", $2); split($2, a, "-"); print a[1]}' /etc/os-release)
# Get OS ID and version from /etc/os-release
source /etc/os-release
OS_ID=$ID
ARCH_ID=$BUILD_ID
OS_VERSION=$VERSION_ID
CODENAME=$VERSION_CODENAME
# Check for Ubuntu versions
if [[ "$OS_ID" == "ubuntu" ]]; then
if [[ "$OS_VERSION" == "24.04" ]]; then
wget -q $repo/tsubuntu24.sh && chmod +x tsubuntu24.sh && ./tsubuntu24.sh
elif [[ "$OS_VERSION" == "22.04" ]]; then
wget -q $repo/tsubuntu22.sh && chmod +x tsubuntu22.sh && ./tsubuntu22.sh
elif [[ "$OS_VERSION" == "20.04" ]]; then
wget -q $repo/tsubuntu20.sh && chmod +x tsubuntu20.sh && ./tsubuntu20.sh
elif [[ "$OS_VERSION" == "24.10" ]]; then
wget -q $repo/tsubuntu2410.sh && chmod +x tsubuntu2410.sh && ./tsubuntu2410.sh
elif [[ "$OS_VERSION" == "25.04" ]]; then
wget -q $repo/tsubuntu2504.sh && chmod +x tsubuntu2504.sh && ./tsubuntu2504.sh
else
echo "Unsupported Ubuntu version: $OS_VERSION"
exit 1
fi
# Check for Debian versions
elif [[ "$OS_ID" == "debian" ]]; then
if [[ "$OS_VERSION" == "12" ]]; then
wget -q $repo/tsubuntudebian.sh && chmod +x tsubuntudebian.sh && ./tsubuntudebian.sh
elif [[ "$OS_VERSION" == "11" ]]; then
echo "This doesn't exist yet."
wget -q $repo/tsubuntudebian.sh && chmod +x tsubuntudebian.sh && ./tsubuntudebian.sh
elif [[ "$CODENAME" == "trixie" ]]; then
wget -q $repo/tsubuntudebian.sh && chmod +x tsubuntudebian.sh && ./tsubuntudebian.sh
else
echo "Unsupported Debian version: $OS_VERSION"
exit 1
fi
# Check for Fedora versions
elif [[ "$OS_ID" == "fedora" ]]; then
if [[ "$OS_VERSION" == "40" ]]; then
wget -q $repo/others/tsubuntufedora40.sh && chmod +x tsubuntufedora40.sh && ./tsubuntufedora40.sh
elif [[ "$OS_VERSION" == "41" ]]; then
wget -q $repo/others/tsubuntufedora41.sh && chmod +x tsubuntufedora41.sh && ./tsubuntufedora41.sh
elif [[ "$OS_VERSION" == "42" ]]; then
echo "This doesn't exist yet."
wget -q $repo/others/tsubuntufedora42.sh && chmod +x tsubuntufedora42.sh && ./tsubuntufedora42.sh
else
echo "Unsupported Fedora version: $OS_VERSION"
exit 1
fi
# Check for RHEL versions
elif [[ "$rhel_version" == "9" ]]; then
wget -q $repo/tsubunturhel9.sh && chmod +x tsubunturhel9.sh && ./tsubunturhel9.sh
if [[ "$rhel_version" == "10" ]]; then
wget -q $repo/tsubunturhel10.sh && chmod +x tsubunturhel10.sh && ./tsubunturhel10.sh
elif [[ "$rhel_version" == "11" ]]; then
echo "This doesn't exist yet."
else
echo "Unsupported RHEL version: $rhel_version"
exit 1
fi
# Check for SUSE versions
elif [[ "$OS_SUSE" == "opensuse" ]]; then
if [[ "$OS_ID" == "opensuse-tumbleweed" ]]; then
wget -q $repo/others/tsubuntutumbleweed.sh && chmod +x tsubuntutumbleweed.sh && ./tsubuntutumbleweed.sh
elif [[ "$OS_ID" == "opensuse-leap" ]]; then
echo "LEAP"
wget -q $repo/others/tsubuntutumbleweed.sh && chmod +x tsubuntutumbleweed.sh && ./tsubuntutumbleweed.sh
elif [[ "$OS_ID" == "opensuse-slowroll" ]]; then
wget -q $repo/others/tsubuntutumbleweed.sh && chmod +x tsubuntutumbleweed.sh && ./tsubuntutumbleweed.sh
else
echo "Unsupported OpenSUSE version: $OS_ID"
exit 1
fi
# Check for Arch
elif [[ "$ARCH_ID" == "rolling" ]]; then
if [[ "$OS_ID" == "manjaro" ]]; then
wget -q $repo/others/tsubuntumanjaro.sh && chmod +x tsubuntumanjaro.sh && ./tsubuntumanjaro.sh
else
wget -q $repo/others/tsubuntuarch.sh && chmod +x tsubuntuarch.sh && ./tsubuntuarch.sh
exit 1
fi
else
echo "Unsupported OS: $OS_ID"
exit 1
fi

138
tsubuntu20.sh Normal file
View file

@ -0,0 +1,138 @@
#!/bin/bash
# Fun fact: this was my first distro, so I thought why not also make the script work for it. All that was needed was to add the ppa for webp support and to change the area screenshot shortcut.
echo "┌──────────────────────────────────────────┐"
echo "│ Tsubuntu for Ubuntu 20.04 │"
echo "└──────────────────────────────────────────┘"
# I tend to avoid PPAs, but having webp support is worth it
sudo add-apt-repository ppa:ubuntuhandbook1/webp-pixbuf-loader -y
sudo apt install webp-pixbuf-loader gnome-tweaks gdebi flatpak unzip dconf-editor gnome-shell-extensions gnome-software-plugin-snap gnome-software-plugin-flatpak gnome-software gufw timeshift -y
echo "┌──────────────────────────────────────────┐"
echo "│Adding Flathub... │"
echo "└──────────────────────────────────────────┘"
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
echo "┌──────────────────────────────────────────┐"
echo "│Enabling right click > new file... │"
echo "└──────────────────────────────────────────┘"
touch $HOME/Templates/NewFile.txt
echo "┌──────────────────────────────────────────┐"
echo "│Enabling webp support... │"
echo "└──────────────────────────────────────────┘"
xdg-mime default org.gnome.eog.desktop image/webp
# extensions making gnome usable
# Yes, this is necessary. It took me a long while to figure out why this damned script would only install one extension.
mkdir $HOME/.local/share/gnome-shell/extensions/
echo "┌──────────────────────────────────────────┐"
echo "│Installing clipboard history extension... │"
echo "└──────────────────────────────────────────┘"
cd $HOME
downloadedzip2="clipboard-indicatortudmotu.com.v34.shell-extension.zip"
linktozip2="https://extensions.gnome.org/extension-data/clipboard-indicatortudmotu.com.v34.shell-extension.zip"
alternativelinktozip2="$extensionsrepo$downloadedzip2"
folder2="clipboard-indicator@tudmotu.com"
mkdir $folder2
cd $folder2
wget --server-response $linktozip2 || wget $alternativelinktozip2
unzip $downloadedzip2
rm $downloadedzip2
cd $HOME
mv $folder2 $HOME/.local/share/gnome-shell/extensions/
echo "┌──────────────────────────────────────────┐"
echo "│Installing corner tiling extension... │"
echo "└──────────────────────────────────────────┘"
cd $HOME
downloadedzip1="tiling-assistantleleat-on-github.v23.shell-extension.zip"
linktozip1="https://extensions.gnome.org/extension-data/tiling-assistantleleat-on-github.v23.shell-extension.zip"
alternativelinktozip1="$extensionsrepo$downloadedzip1"
folder1="tiling-assistant@leleat-on-github"
mkdir $folder1
cd $folder1
wget --server-response $linktozip1 || wget $alternativelinktozi1
unzip $downloadedzip1
rm $downloadedzip1
cd $HOME
mv $folder1 $HOME/.local/share/gnome-shell/extensions/
echo "┌──────────────────────────────────────────┐"
echo "│Tweaking the file manager and the dock... │"
echo "└──────────────────────────────────────────┘"
echo "file:///home/$USER/Desktop" >> ~/.config/gtk-3.0/bookmarks
gsettings set org.gnome.nautilus.preferences show-create-link 'true'
gsettings set org.gnome.nautilus.preferences show-delete-permanently 'true'
gsettings set org.gtk.Settings.FileChooser sort-directories-first 'true'
gsettings set org.gnome.nautilus.preferences default-folder-viewer 'list-view'
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize-or-previews'
gsettings set org.gnome.shell.extensions.dash-to-dock middle-click-action 'quit'
echo "┌──────────────────────────────────────────┐"
echo "│Remember numlock state... │"
echo "└──────────────────────────────────────────┘"
gsettings set org.gnome.desktop.peripherals.keyboard remember-numlock-state 'true'
echo "┌──────────────────────────────────────────┐"
echo "│Setting up shortcuts (try Super + E) │"
echo "└──────────────────────────────────────────┘"
gsettings set org.gnome.settings-daemon.plugins.media-keys area-screenshot "['<Shift><Super>s']"
gsettings set org.gnome.settings-daemon.plugins.media-keys home "['<Super>e']"
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name 'taskmanager'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command 'gnome-system-monitor'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding '<Primary><Shift>Escape'
touch "$HOME/Desktop/Finish_Setup.sh"
chmod +x "$HOME/Desktop/Finish_Setup.sh"
echo '#!/bin/bash
gnome-extensions enable clipboard-indicator@tudmotu.com
sleep 1
gnome-extensions enable tiling-assistant@leleat-on-github
sleep 1
rm "$HOME/Desktop/Finish_Setup.sh"
' >> "$HOME/Desktop/Finish_Setup.sh"
echo -e "\e[1;31m┌──────────────────────────────────────────┐\e[0m"
echo "│This script installed a software center │"
echo "│app with support for Snap, Flatpak and │"
echo "│native packages. This makes the default │"
echo "│Snap Store redundant. │"
echo -e "\e[1;31m└──────────────────────────────────────────┘\e[0m"
read -p "│Remove the Snap Store? [y/n]:│" choice
if [[ "$choice" == "y" || "$choice" == "Y" ]]; then
sudo snap remove snap-store
else
echo "┌──────────────────────────────────────────┐"
echo "│Understandable. Keeping the snap-store. │"
echo "└──────────────────────────────────────────┘"
fi
read -p "│Enable firewall? [y/n]:│" choice
if [[ "$choice" == "y" || "$choice" == "Y" ]]; then
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw enable
else
echo "┌──────────────────────────────────────────┐"
echo "│Understandable. │"
echo "└──────────────────────────────────────────┘"
fi
echo "┌──────────────────────────────────────────┐"
echo "│Restart your PC and then run │"
echo "│Finish_Setup.sh, located on your desktop │"
echo "└──────────────────────────────────────────┘"
read -p "Press Enter to close...."

142
tsubuntu22.sh Normal file
View file

@ -0,0 +1,142 @@
#!/bin/bash
echo "┌──────────────────────────────────────────┐"
echo "│ Tsubuntu for Ubuntu 22.04 │"
echo "└──────────────────────────────────────────┘"
sudo apt install gnome-tweaks flatpak gdebi unzip gnome-extensions-app dconf-editor libfuse2 gnome-software-plugin-snap gnome-software-plugin-flatpak gnome-software webp-pixbuf-loader gufw timeshift -y
# libfuse2 in order for all AppImages to run
echo "┌──────────────────────────────────────────┐"
echo "│Adding Flathub... │"
echo "└──────────────────────────────────────────┘"
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
echo "┌──────────────────────────────────────────┐"
echo "│Enabling right click > new file... │"
echo "└──────────────────────────────────────────┘"
touch $HOME/Templates/NewFile.txt
echo "┌──────────────────────────────────────────┐"
echo "│Enabling webp support... │"
echo "└──────────────────────────────────────────┘"
# well, technically the support is enabled by installing webp-pixbuf-loader, but why run apt install twice for the sake of aesthetics
xdg-mime default org.gnome.eog.desktop image/webp
# extensions making gnome usable
# Yes, this is necessary. It took me a long while to figure out why this damned script would only install one extension.
mkdir $HOME/.local/share/gnome-shell/extensions/
echo "┌──────────────────────────────────────────┐"
echo "│Installing clipboard history extension... │"
echo "└──────────────────────────────────────────┘"
cd $HOME
downloadedzip2="clipboard-historyalexsaveau.dev.v41.shell-extension.zip"
linktozip2="https://extensions.gnome.org/extension-data/clipboard-historyalexsaveau.dev.v41.shell-extension.zip"
alternativelinktozip2="$extensionsrepo$downloadedzip2"
folder2="clipboard-history@alexsaveau.dev"
mkdir $folder2
cd $folder2
wget --server-response $linktozip2 || wget $alternativelinktozip2
unzip $downloadedzip2
rm $downloadedzip2
cd $HOME
mv $folder2 $HOME/.local/share/gnome-shell/extensions/
echo "┌──────────────────────────────────────────┐"
echo "│Installing corner tiling extension... │"
echo "└──────────────────────────────────────────┘"
cd $HOME
downloadedzip1="tiling-assistantleleat-on-github.v36.shell-extension.zip"
linktozip1="https://extensions.gnome.org/extension-data/tiling-assistantleleat-on-github.v36.shell-extension.zip"
alternativelinktozip1="$extensionsrepo$downloadedzip1"
folder1="tiling-assistant@leleat-on-github"
mkdir $folder1
cd $folder1
wget --server-response $linktozip1 || wget $alternativelinktozi1
unzip $downloadedzip1
rm $downloadedzip1
cd $HOME
mv $folder1 $HOME/.local/share/gnome-shell/extensions/
echo "┌──────────────────────────────────────────┐"
echo "│Tweaking the file manager and the dock... │"
echo "└──────────────────────────────────────────┘"
echo "file:///home/$USER/Desktop" >> ~/.config/gtk-3.0/bookmarks
gsettings set org.gnome.nautilus.preferences show-create-link 'true'
gsettings set org.gnome.nautilus.preferences show-delete-permanently 'true'
gsettings set org.gtk.Settings.FileChooser sort-directories-first 'true'
gsettings set org.gnome.nautilus.preferences default-folder-viewer 'list-view'
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize-or-previews'
gsettings set org.gnome.shell.extensions.dash-to-dock middle-click-action 'quit'
echo "┌──────────────────────────────────────────┐"
echo "│Remember numlock state... │"
echo "└──────────────────────────────────────────┘"
gsettings set org.gnome.desktop.peripherals.keyboard remember-numlock-state 'true'
echo "┌──────────────────────────────────────────┐"
echo "│Setting up shortcuts (try Super + E) │"
echo "└──────────────────────────────────────────┘"
gsettings set org.gnome.shell.keybindings screenshot "['Print']"
gsettings set org.gnome.shell.keybindings show-screenshot-ui "['<Shift><Super>s']"
gsettings set org.gnome.settings-daemon.plugins.media-keys home "['<Super>e']"
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name 'taskmanager'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command 'gnome-system-monitor'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding '<Primary><Shift>Escape'
touch "$HOME/Desktop/Finish_Setup.sh"
chmod +x "$HOME/Desktop/Finish_Setup.sh"
echo '#!/bin/bash
gnome-extensions enable clipboard-history@alexsaveau.dev
sleep 1
gnome-extensions enable tiling-assistant@leleat-on-github
sleep 1
rm "$HOME/Desktop/Finish_Setup.sh"
' >> "$HOME/Desktop/Finish_Setup.sh"
echo -e "\e[1;31m┌──────────────────────────────────────────┐\e[0m"
echo "│This script installed a software center │"
echo "│app with support for Snap, Flatpak and │"
echo "│native packages. This makes the default │"
echo "│Snap Store redundant. │"
echo -e "\e[1;31m└──────────────────────────────────────────┘\e[0m"
read -p "│Remove the Snap Store? [y/n]:│" choice
if [[ "$choice" == "y" || "$choice" == "Y" ]]; then
sudo snap remove snap-store
else
echo "┌──────────────────────────────────────────┐"
echo "│Understandable. Keeping the snap-store. │"
echo "└──────────────────────────────────────────┘"
fi
read -p "│Enable firewall? [y/n]:│" choice
if [[ "$choice" == "y" || "$choice" == "Y" ]]; then
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw enable
else
echo "┌──────────────────────────────────────────┐"
echo "│Understandable. │"
echo "└──────────────────────────────────────────┘"
fi
echo "┌──────────────────────────────────────────┐"
echo "│Restart your PC and then run │"
echo "│Finish_Setup.sh, located on your desktop │"
echo "└──────────────────────────────────────────┘"
read -p "Press Enter to close...."

125
tsubuntu24.sh Normal file
View file

@ -0,0 +1,125 @@
#!/bin/bash
extensionsrepo="https://raw.githubusercontent.com/Tsu-gu/tsubuntu/main/extensions/"
echo "┌──────────────────────────────────────────┐"
echo "│ Tsubuntu for Ubuntu 24.04 │"
echo "└──────────────────────────────────────────┘"
sudo apt install gnome-shell-extension-gpaste gnome-tweaks flatpak unzip gnome-extensions-app dconf-editor libfuse2 gnome-software-plugin-snap gnome-software-plugin-flatpak gnome-software gufw timeshift -y
# libfuse2 in order for all AppImages to run
echo "┌──────────────────────────────────────────┐"
echo "│Adding Flathub... │"
echo "└──────────────────────────────────────────┘"
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
echo "┌──────────────────────────────────────────┐"
echo "│Enabling right click > new file... │"
echo "└──────────────────────────────────────────┘"
touch $HOME/Templates/NewFile.txt
# extensions making gnome usable
# Yes, this is necessary. It took me a long while to figure out why this damned script would only install one extension.
mkdir $HOME/.local/share/gnome-shell/extensions/
echo "┌──────────────────────────────────────────┐"
echo "│Installing clipboard history extension... │"
echo "└──────────────────────────────────────────┘"
# This has to be bound to something else as by default it's also Super V for whatever reason.
gsettings set org.gnome.shell.keybindings toggle-message-tray "['<Super>n']"
echo "┌──────────────────────────────────────────┐"
echo "│Installing desktop icons extension and │"
echo "│disabling the broken one... │"
echo "└──────────────────────────────────────────┘"
# This will soon be removed as a fixed version has landed in noble-proposed
cd $HOME
downloadedzip2="gtk4-dingsmedius.gitlab.com.v83.shell-extension.zip"
linktozip2="https://extensions.gnome.org/extension-data/gtk4-dingsmedius.gitlab.com.v83.shell-extension.zip"
alternativelinktozip2="$extensionsrepo$downloadedzip2"
folder2="gtk4-ding@smedius.gitlab.com"
mkdir $folder2
cd $folder2
wget --server-response $linktozip2 || wget $alternativelinktozip2
unzip $downloadedzip2
rm $downloadedzip2
cd $HOME
mv $folder2 $HOME/.local/share/gnome-shell/extensions/
echo "┌──────────────────────────────────────────┐"
echo "│Tweaking the file manager and the dock... │"
echo "└──────────────────────────────────────────┘"
echo "file:///home/$USER/Desktop" >> ~/.config/gtk-3.0/bookmarks
gsettings set org.gnome.nautilus.preferences show-create-link 'true'
gsettings set org.gnome.nautilus.preferences show-delete-permanently 'true'
gsettings set org.gtk.Settings.FileChooser sort-directories-first 'true'
gsettings set org.gnome.nautilus.preferences default-folder-viewer 'list-view'
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize-or-previews'
gsettings set org.gnome.shell.extensions.dash-to-dock middle-click-action 'quit'
echo "┌──────────────────────────────────────────┐"
echo "│Tweaking the text editor... │"
echo "└──────────────────────────────────────────┘"
gsettings set org.gnome.TextEditor show-line-numbers 'true'
gsettings set org.gnome.TextEditor spellcheck 'false'
echo "┌──────────────────────────────────────────┐"
echo "│Remember numlock state... │"
echo "└──────────────────────────────────────────┘"
gsettings set org.gnome.desktop.peripherals.keyboard remember-numlock-state 'true'
echo "┌──────────────────────────────────────────┐"
echo "│Setting up shortcuts (try Super + E) │"
echo "└──────────────────────────────────────────┘"
gsettings set org.gnome.shell.keybindings screenshot "['Print']"
gsettings set org.gnome.shell.keybindings show-screenshot-ui "['<Shift><Super>s']"
gsettings set org.gnome.settings-daemon.plugins.media-keys home "['<Super>e']"
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name 'taskmanager'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command 'gnome-system-monitor'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding '<Primary><Shift>Escape'
wget -q $extensionsrepo/ubuntu24setup.sh
cp ubuntu24setup.sh $HOME/Desktop/Finish_Setup.sh
chmod +x "$HOME/Desktop/Finish_Setup.sh"
echo -e "\e[1;31m┌──────────────────────────────────────────┐\e[0m"
echo "│This script installed a software center │"
echo "│app with support for Snap, Flatpak and │"
echo "│native packages. This makes the default │"
echo "│Snap Store redundant. │"
echo -e "\e[1;31m└──────────────────────────────────────────┘\e[0m"
read -p "│Remove the Snap Store? [y/n]:│" choice
if [[ "$choice" == "y" || "$choice" == "Y" ]]; then
sudo snap remove snap-store
else
echo "┌──────────────────────────────────────────┐"
echo "│Understandable. Keeping the snap-store. │"
echo "└──────────────────────────────────────────┘"
fi
read -p "│Enable firewall? [y/n]:│" choice
if [[ "$choice" == "y" || "$choice" == "Y" ]]; then
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw enable
else
echo "┌──────────────────────────────────────────┐"
echo "│Understandable. │"
echo "└──────────────────────────────────────────┘"
fi
echo "┌──────────────────────────────────────────┐"
echo "│Restart your PC and then run │"
echo "│Finish_Setup.sh, located on your desktop │"
echo "└──────────────────────────────────────────┘"
read -p "Press Enter to close...."

104
tsubuntu2410.sh Normal file
View file

@ -0,0 +1,104 @@
#!/bin/bash
extensionsrepo="https://raw.githubusercontent.com/Tsu-gu/tsubuntu/main/extensions/"
echo "┌──────────────────────────────────────────┐"
echo "│ Tsubuntu for Ubuntu 24.04 │"
echo "└──────────────────────────────────────────┘"
sudo apt install gnome-shell-extension-gpaste gnome-tweaks flatpak unzip gnome-extensions-app dconf-editor libfuse2 gnome-software-plugin-snap gnome-software-plugin-flatpak gnome-software gufw timeshift -y
# libfuse2 in order for all AppImages to run
echo "┌──────────────────────────────────────────┐"
echo "│Adding Flathub... │"
echo "└──────────────────────────────────────────┘"
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
echo "┌──────────────────────────────────────────┐"
echo "│Enabling right click > new file... │"
echo "└──────────────────────────────────────────┘"
touch $HOME/Templates/NewFile.txt
# extensions making gnome usable
# Yes, this is necessary. It took me a long while to figure out why this damned script would only install one extension.
mkdir $HOME/.local/share/gnome-shell/extensions/
echo "┌──────────────────────────────────────────┐"
echo "│Installing clipboard history extension... │"
echo "└──────────────────────────────────────────┘"
# This has to be bound to something else as by default it's also Super V for whatever reason.
gsettings set org.gnome.shell.keybindings toggle-message-tray "['<Super>n']"
echo "┌──────────────────────────────────────────┐"
echo "│Tweaking the file manager and the dock... │"
echo "└──────────────────────────────────────────┘"
echo "file:///home/$USER/Desktop" >> ~/.config/gtk-3.0/bookmarks
gsettings set org.gnome.nautilus.preferences show-create-link 'true'
gsettings set org.gnome.nautilus.preferences show-delete-permanently 'true'
gsettings set org.gtk.Settings.FileChooser sort-directories-first 'true'
gsettings set org.gnome.nautilus.preferences default-folder-viewer 'list-view'
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize-or-previews'
gsettings set org.gnome.shell.extensions.dash-to-dock middle-click-action 'quit'
echo "┌──────────────────────────────────────────┐"
echo "│Tweaking the text editor... │"
echo "└──────────────────────────────────────────┘"
gsettings set org.gnome.TextEditor show-line-numbers 'true'
gsettings set org.gnome.TextEditor spellcheck 'false'
echo "┌──────────────────────────────────────────┐"
echo "│Remember numlock state... │"
echo "└──────────────────────────────────────────┘"
gsettings set org.gnome.desktop.peripherals.keyboard remember-numlock-state 'true'
echo "┌──────────────────────────────────────────┐"
echo "│Setting up shortcuts (try Super + E) │"
echo "└──────────────────────────────────────────┘"
gsettings set org.gnome.shell.keybindings screenshot "['Print']"
gsettings set org.gnome.shell.keybindings show-screenshot-ui "['<Shift><Super>s']"
gsettings set org.gnome.settings-daemon.plugins.media-keys home "['<Super>e']"
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name 'taskmanager'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command 'gnome-system-monitor'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding '<Primary><Shift>Escape'
wget -q $extensionsrepo/ubuntu2410setup.sh
cp ubuntu2410setup.sh $HOME/Desktop/Finish_Setup.sh
chmod +x "$HOME/Desktop/Finish_Setup.sh"
echo -e "\e[1;31m┌──────────────────────────────────────────┐\e[0m"
echo "│This script installed a software center │"
echo "│app with support for Snap, Flatpak and │"
echo "│native packages. This makes the default │"
echo "│Snap Store redundant. │"
echo -e "\e[1;31m└──────────────────────────────────────────┘\e[0m"
read -p "│Remove the Snap Store? [y/n]:│" choice
if [[ "$choice" == "y" || "$choice" == "Y" ]]; then
sudo snap remove snap-store
else
echo "┌──────────────────────────────────────────┐"
echo "│Understandable. Keeping the snap-store. │"
echo "└──────────────────────────────────────────┘"
fi
read -p "│Enable firewall? [y/n]:│" choice
if [[ "$choice" == "y" || "$choice" == "Y" ]]; then
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw enable
else
echo "┌──────────────────────────────────────────┐"
echo "│Understandable. │"
echo "└──────────────────────────────────────────┘"
fi
echo "┌──────────────────────────────────────────┐"
echo "│Restart your PC and then run │"
echo "│Finish_Setup.sh, located on your desktop │"
echo "└──────────────────────────────────────────┘"
read -p "Press Enter to close...."