-
Notifications
You must be signed in to change notification settings - Fork 0
/
tsubuntu24.sh
125 lines (101 loc) · 8.29 KB
/
tsubuntu24.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
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="[email protected]"
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...."