-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPos_Install_Ubuntu.sh
223 lines (191 loc) · 6.19 KB
/
Pos_Install_Ubuntu.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
#!/usr/bin/env bash
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------------------------------------- #
# ------------------------------------------------ CABEÇALHO -------------------------------------------------- #
## AUTOR: Edius Ferreira
# ---Created on Wed Feb 15 23:33:30 2023---
## EMAIL: [email protected]
## GITHUB: edius1987
## NOME: Pós Instalação Ubuntu
## DESCRIÇÃO:
### Script de pós instalação desenvolvido para base Ubuntu 22.04,
### baseado em meu uso pessoal dos programas, configurações e personalizações.
## LICENÇA: MIT License
## Copyright (c) 2023 Edius Ferreira
## VERSÂO: Beta - versão em estágio ainda de desenvolvimento
### Para utilizar baixe e use o comando "./Pos_Install_Ubuntu.sh".
# ------------------------------------------------------------------------------------------------------------- #
# -------------------------------------------- VARIÁVEIS E REQUISITOS ----------------------------------------- #
# Variávveis e links de download dinâmicos.
ppas=(appimagelauncher-team/stable teejee2008/foss)
url_flathub="https://flathub.org/repo/flathub.flatpakrepo"
url_nerd-fonts="https://github.com/ryanoasis/nerd-fonts/raw/HEAD/patched-fonts/DroidSansMono/complete/Droid%20Sans%20Mono%20Nerd%20Font%20Complete.otf"
url_oh_my-bash="https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh"
url_MX="https://github.com/MX-Linux/mx-conky-data.git"
### Programas para instalação e desinstalação.
apps_remover=( gnome-abrt
gnome-boxes
gedit
gnome-clocks
gnome-connections
gnome-contacts
gnome-photos
gnome-software
gnome-text-editor
gnome-tour
libreoffice-*
usb-creator-gtk
totem
rhythmbox
thunderbird
yelp)
apps=(cheese
wget
net-tools
conky-manager2
curl
synaptic
appimagelauncher
openssh-server
fonts-powerline
python3.11
python3-pip
obs-studio
npm
npx
nodejs
jupyter-notebook
cowsay
papirus-folders
papirus-icon-theme
ffmpegthumbnailer
flameshot
fortune-mod
gnome-tweaks
fonts-croscore
heroic-games-launcher-bin
hugo
lolcat
lutris
mangohud
neofetch
virt-manager
steam-installer
steam-devices
steam
unrar-free)
flatpak=(com.github.GradienceTeam.Gradience
nl.hjdskes.gcolor3
org.gimp.GIMP
org.ksnip.ksnip
com.github.johnfactotum.Foliate
org.libreoffice.LibreOffice
de.haeckerfelix.Fragments
org.remmina.Remmina
com.github.muriloventuroso.easyssh
com.raggesilver.BlackBox
com.github.xournalpp.xournalpp
com.github.jeromerobert.pdfarranger
ca.desrt.dconf-editor
com.vixalien.sticky
net.cozic.joplin_desktop
org.kde.krita
org.localsend.localsend_app
com.github.maoschanz.drawing
com.microsoft.Edge
com.brave.Browser
org.gnome.Lollypop
org.telegram.desktop)
snaps=(spotify discord photogimp vlc atom slack teams-for-linux)
# ------------------------------------------------------------------------------------------------------------- #
# --------------------------------------------------- TESTE --------------------------------------------------- #
### Check se a distribuição é a correta.
# Obter a versão do sistema
version=$(lsb_release -rs)
# Verificar se a versão é 22.04
if [ "$version" == "22.04" ]; then
echo "O sistema está executando o Ubuntu 22.04. Iniciando instalação..."
else
echo "Este script é compatível apenas com o Ubuntu 22.04."
exit 1
fi
## Adicionando PPAs
echo 'Adicionando PPAs'
echo
for ppa in ${ppas[@]}; do
apt-add-repository "ppa:"$ppa -y
done
rm -rf /etc/apt/preferences.d/nosnap.pref
apt update
# ----------------------------- REQUISITOS ----------------------------- #
## Removendo travas eventuais do apt ##
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/cache/apt/archives/lock
### Desinstalando apps desnecessários.
for nome_do_programa in "${apps_remover[@]}"; do
sudo apt remove "$nome_do_programa" -y
done
### Atualizando sistema após adição de novos repositórios.
sudo apt upgrade -y
# Instalar programas no apt
for nome_do_programa in ${apps[@]}; do
if ! dpkg -l | grep -q $nome_do_programa; then # Só instala se já não estiver instalado
apt install "$apps" -y
else
echo "[INSTALADO] - $apps"
fi
done
echo 'Instalando Snaps e Flatpaks'
snap install ${snaps[@]}
snap install --classic ${snaps_classic[@]}
flatpak remote-add --if-not-exists flathub ${url_flathub[@]}
flatpak install flathub -y ${flatpak[@]}
### Configurando Gnome.
echo 'Configurando GNOME'
gsettings set org.gnome.desktop.peripherals.touchpad disable-while-typing true
gsettings set org.gnome.desktop.peripherals.touchpad click-method 'fingers'
gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true
gsettings set org.gnome.desktop.peripherals.touchpad two-finger-scrolling-enabled true
gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll true
### Configurando AppImages.
echo 'Configurando AppImages'
mkdir $HOME/Applications
mv *.AppImage $HOME/Applications
chmod 777 -r $HOME/Applications/
### Instalando PPA AppImageLauncher
wget "https://git.opendesktop.org/akiraohgaki/ocs-manager/uploads/d3dc42436b82d11360ebc96b38d4aaf4/ocs-manager-0.8.1-1-x86_64.AppImage"
chmod +x appimaged-x86_64.AppImage
./ocs-manager-0.8.1-1-x86_64.AppImage --install
echo 'Atualizando o sistema'
sudo apt dist-upgrade -y
sudo apt full-upgrade
sudo apt autoclean
# ----------------------------- Personalização ----------------------------- #
if [ -d "$HOME/".local/share/fonts ]
then
wget -cq --show-progress "$url_nerd-fonts" -P "$HOME"/.local/share/fonts
fc-cache -f -v >/dev/null
else
mkdir -p "$HOME"/.local/share/fonts
wget -cq --show-progress "$url_nerd-fonts" -P "$HOME"/.local/share/fonts
fc-cache -f -v >/dev/null
fi
# ----------------------------- Oh my bash! ----------------------------- #
echo 'Instalando Oh My Bash!'
bash -c "$(url_oh_my-bash)"
fc-cache -f -v >/dev/null
# ----------------------------- MX-Conky-Data ----------------------------- #
echo 'Instalando MX-Conky-Data'
git "$(url_MX)" ~/.conky
fc-cache -f -v >/dev/null
# ----------------------------- MComplementos ----------------------------- #
# conky-startup.sh
#
# conky.desktop
#
neofetch
echo
echo
echo "Instalação finalizada, é recomendado reiniciar o sistema."
echo "Até mais e boa trabalho!"
echo