-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpop_os
180 lines (156 loc) · 5.69 KB
/
pop_os
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
#!/usr/bin/bash
# Tested only for Pop!_OS
append(){ # $1: text, $2: path
sudo=""
if [[ $2 != */home* ]]; then
sudo="sudo"
fi
$sudo mkdir -p $(dirname "$2") && $sudo touch "$2"
if [[ $(cat $2) == *"$1"* ]]; then
echo -e "
\rThe following lines were already added
\r=============
\r$1
\r============="
else
cat << POMU | $sudo tee -a $2 > /dev/null
$1
POMU
fi
}
installVscodeExtension(){
list=(${1//'\n'/})
for i in ${!list[@]}; do
code --install-extension ${list[i]}
done
}
sudo apt update -y
sudo apt upgrade -y
# Remove LibreOffice
echo "
Removing LibreOffice"
sudo apt-get remove --purge libreoffice*
sudo apt-get clean
sudo apt-get autoremove
# apt
echo "
Installing apt packages"
sudo add-apt-repository ppa:git-core/ppa -y
sudo apt update -y
sudo apt install git xclip neofetch aria2 gnome-tweaks -y
# flatpak
echo "
Installing flatpak packages"
flatpak install flathub org.libreoffice.LibreOffice com.belmoussaoui.Authenticator org.gimp.GIMP io.mpv.Mpv com.discordapp.Discord org.qbittorrent.qBittorrent org.kde.kdenlive org.x.Warpinator com.github.finefindus.eyedropper org.bunkus.mkvtoolnix-gui com.mattjakeman.ExtensionManager -y
# Github CLI & login
echo "
Installing Github CLI & login"
type -p curl >/dev/null || sudo apt install curl -y
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh -y
gh auth login
# Linux config
echo "
Adding Linux configs"
git clone https://github.com/pomubry/linux-config.git ~/Downloads/linux-config
chmod +x ~/Downloads/linux-config/bin/*
mkdir ~/bin
cp -r ~/Downloads/linux-config/bin ~/Downloads/linux-config/mumble-dark.qbtheme ~/Downloads/linux-config/.poshthemes ~
cp -r ~/Downloads/linux-config/Code ~/.config
mkdir -p ~/.var/app/io.mpv.Mpv/config/mpv
cp -r ~/Downloads/linux-config/mpv/* ~/.var/app/io.mpv.Mpv/config/mpv
append '
# custom alias
alias mpv="flatpak run io.mpv.Mpv"
alias mkvmerge="flatpak run org.bunkus.mkvtoolnix-gui"' ~/.bashrc
append '
# bin
export PATH=~/bin:$PATH' ~/.bashrc
if [[ $(cat ~/.gitconfig) == *defaultbranch* ]]; then
echo "Github user/defaultbranch config already added. Skipping..."
else
echo "$(cat ~/Downloads/linux-config/.gitconfig)
$(cat ~/.gitconfig)" > ~/.gitconfig
fi
rm -rf ~/Downloads/linux-config
# oh-my-posh
echo "
Installing oh-my-posh"
sudo wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh
sudo chmod +x /usr/local/bin/oh-my-posh
# mkdir ~/.poshthemes
# wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/themes.zip -O ~/.poshthemes/themes.zip
# unzip -o ~/.poshthemes/themes.zip -d ~/.poshthemes
chmod u+rw ~/.poshthemes/*.omp.*
# rm ~/.poshthemes/themes.zip
# font for oh-my-posh
echo "
Installing font for oh-my-posh"
wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/CascadiaCode.zip -O ~/Downloads/cascadia-nf.zip
mkdir ~/.fonts
unzip -o -j ~/Downloads/cascadia-nf.zip "Caskaydia Cove Nerd Font Complete Mono Regular.otf" -d ~/.fonts
rm ~/Downloads/cascadia-nf.zip
# config for oh-my-posh
append '
# poshtheme config
eval "$(oh-my-posh init bash --config ~/.poshthemes/pdrome.omp.json)"' ~/.bashrc
# nvm
echo "
Installing nvm"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
# VSCode
echo "
Installing VSCode"
sudo apt-get install wget gpg
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
rm -f packages.microsoft.gpg
sudo apt install apt-transport-https
sudo apt update
sudo apt install code
# vscode extension
echo "
Installing VSCode extensions"
installVscodeExtension '
AntiAntiSepticeye.vscode-color-picker
bradlc.vscode-tailwindcss
dbaeumer.vscode-eslint
dotenv.dotenv-vscode
dsznajder.es7-react-js-snippets
esbenp.prettier-vscode
formulahendry.auto-rename-tag
formulahendry.code-runner
ms-python.black-formatter
ms-python.isort
ms-python.python
quicktype.quicktype
ritwickdey.LiveServer
vscode-icons-team.vscode-icons
Vue.volar
Vue.vscode-typescript-vue-plugin
zhuangtongfa.material-theme'
# Veracrypt
echo "
Installing Veracrypt"
veracryptLatest=$(curl https://www.veracrypt.fr/en/Downloads.html | grep -i "Latest Stable Release" | egrep -o "[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}")
ubuntuVersion=$(cat /proc/version | egrep -o "[0-9]{2}\.[0-9]{2}")
ubuntuVersion=${ubuntuVersion:0:5}
veracryptGui="https://launchpad.net/veracrypt/trunk/$veracryptLatest/+download/veracrypt-$veracryptLatest-Ubuntu-$ubuntuVersion-amd64.deb"
wget $veracryptGui -O ~/Downloads/veracryptGui.deb
sudo apt install ~/Downloads/veracryptGui.deb -y
rm ~/Downloads/veracryptGui.deb
# ProtonVPN
echo "
Installing ProtonVPN"
protonvpn=$(curl https://protonvpn.com/support/linux-ubuntu-vpn-setup/ | grep "/stable" | egrep -o "https.+\.deb")
wget $protonvpn -O ~/Downloads/protonvpn.deb
sudo apt install ~/Downloads/protonvpn.deb
sudo apt update -y
sudo apt install protonvpn
sudo apt install gnome-shell-extension-appindicator gir1.2-appindicator3-0.1
rm ~/Downloads/protonvpn.deb
echo "Done!"