This repository has been archived by the owner on Feb 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·261 lines (206 loc) · 8.9 KB
/
setup.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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
#!/usr/bin/env bash
set -e
# Update Packages
sudo apt update
# Do all work in the tmp directory
mkdir ~/temporary-linux-setup
cd ~/temporary-linux-setup
# Clone this repository
git clone https://github.com/polaroidkidd/linux-setup.git
# Init Submodules
cd linux-setup
git submodule update --init --recursive
# update permissions
cd ..
sudo chmod -R a+rw linux-setup
cd linux-setup
# get the path to this script
WORK_PATH=$(dirname "$0")
WORK_PATH=$( (cd "$WORK_PATH" && pwd))
# i3 & i3-gaps
sudo apt install -y xorg i3 i3lock-fancy xserver-xorg xutils-dev libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf xutils-dev libtool automake
cd $WORK_PATH/xcb-util-xrm
git submodule update --init --recursive
./autogen.sh --prefix=/usr
sudo make install
# i3
sudo apt install -y libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf libxcb-xrm0 libxcb-xrm-dev automake libxcb-shape0-dev
cd $WORK_PATH/i3
autoreconf --force --install
rm -rf build
mkdir build
cd build
../configure --prefix=/usr --sysconfdir=/etc --disable-sanitizers
make
sudo make install
# Compton
sudo apt install -y asciidoc pkg-config make gcc libev-libevent-dev libdbus-1-dev libgl1-mesa-dev libgles2-mesa-dev libxcb-present-dev libxcb-sync-dev libxcb-damage0-dev libx11-xcb-dev libev4 libev-dev uthash-dev libxdg-basedir-dev libconfig-dev meson libx11-dev libxcb1-dev libxcb-ewmh-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-randr0-dev libxcb-util0-dev libxcb-shape0-dev libxcb-xkb-dev pkg-config xcb-proto libxcb-xrm-dev libxcb-composite0-dev xcb libxcb-ewmh2 libxcb1-dev libxcb-keysyms1-dev libxcb-util0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcomposite-dev libxrandr-dev libxinerama-dev make cmake automake autoconf xdotool
cd $WORK_PATH/compton
make
make docs
sudo make install
# Light
mkdir -p $WORK_PATH/light
cd $WORK_PATH/light
wget https://github.com/haikarainen/light/releases/download/v1.2/light-1.2.tar.gz
tar xf light-1.2.tar.gz
cd light-1.2
./configure
make
sudo make install
# Fusuma
sudo gpasswd -a $USER input
sudo apt install -y libinput-tools ruby
sudo gem install fusuma
# Extra Tools
sudo apt install -y ranger terminator
# rofi
sudo apt remove meson # not needed because we're using the latest python implementation
sudo apt-get install python3 python3-pip python3-setuptools python3-wheel ninja-build librsvg2-dev libjpeg-dev flex bison check libpango1.0-dev libpangocairo-1.0-0 libcairo2-dev libglib2.0-dev libstartup-notification0-dev libxkbcommon-dev libxcb1-dev doxygen doxygen uncrustify cppcheck ohcount
pip3 install --user meson
cd $WORK_PATH/rofi
git submodule update --init
meson setup build
ninja -C build
sudo ninja -C build install
cp -r $WORK_PATH/dot-files/rofi ~/.config/rofi
# plymouth
cd $WORK_PATH/plymouth-themes
sudo apt install -y plymouth-themes
sudo cp -r pack_2/dark_planet /usr/share/plymouth/themes
sudo update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/dark_planet 100
echo "0" | sudo update-alternatives --config default.plymouth
sudo update-initramfs -u
cd $WORK_PATH
# Copy dot-files
mkdir -p ~/.config/
cp -r $WORK_PATH/dot-files/* ~/.config/
mkdir -p ~/.local/share/applications/
cp -r $WORK_PATH/desktop-entries/* ~/.local/share/applications/
# Install Intel/DisplayPort Driver
sudo mkdir -p /usr/share/X11/xorg.conf.d/
sudo cp $WORK_PATH/dot-files/intel/20-intel.conf /usr/share/X11/xorg.conf.d/20-intel.conf
sudo cp $WORK_PATH/DisplayDriver/20-evdidevice.conf /usr/share/X11/xorg.conf.d/20-evdidevice.conf
cd $WORK_PATH/DisplayDriver/
sudo chmod +x ./displaylink-driver-5.3.1.34.run
sudo ./displaylink-driver-5.3.1.34.run
cp $WORK_PATH/dot-files/oh-my-zsh/.zshrc ~/.zshrc
# polybar
sudo apt install -y polybar
# wallpaper
sudo apt install -y feh
# VS Code
sudo apt install -y apt-transport-https code
# pulse audio
sudo apt install -y pulseaudio pulseaudio-module-bluetooth pulseaudio-utils pavucontrol pasystray
# bluetooth
sudo apt install -y blueman bluez bluez-obexd bluez-tools libbluetooth3
# Brave Browser
sudo apt install -y apt-transport-https curl brave-browser brave-keyring
# FireFox
sudo apt install -y firefox
# Intellij
mkdir -p ~/DevTools/IntelliJ
wget https://download.jetbrains.com/idea/ideaIU-2019.3.1.tar.gz
tar xzvf ideaIU-2019.3.1.tar.gz -C ~/DevTools/IntelliJ
# nextcloud
sudo apt install -y nextcloud-client
# NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
# Spotify
sudo apt -y install spotify-client
# github cli
sudo snap install hub --classic
# google chrome
cd $WORK_PATH
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
# CopyQ
sudo apt install -y copyq
# keepassX
sudo apt install -y keepassx
# Install Fonts
unzip $WORK_PATH/Roboto_Mono.zip -d ${HOME}/.fonts
cp -r $WORK_PATH/dot-files/polybar/fonts ${HOME}/.fonts
# enable bitmap fonts
FILE=/etc/fonts/conf.d/70-no-bitmaps.conf
if test -f "$FILE"; then
sudo rm /etc/fonts/conf.d/70-no-bitmaps.conf
fi
sudo fc-cache -f -v
# Docker
sudo apt remove --yes docker docker-engine docker.io &&
sudo apt update &&
sudo apt --yes --no-install-recommends install \
apt-transport-https \
ca-certificates &&
wget --quiet --output-document=- https://download.docker.com/linux/ubuntu/gpg |
sudo apt-key add - &&
sudo add-apt-repository \
"deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu \
$(lsb_release --codename --short) \
stable" &&
sudo apt update &&
sudo apt --yes --no-install-recommends install docker-ce &&
sudo usermod --append --groups docker "$USER" &&
sudo systemctl enable docker &&
printf '\nDocker installed successfully\n\n'
printf 'Waiting for Docker to start...\n\n'
sleep 3
# Docker Compose
sudo wget \
--output-document=/usr/local/bin/docker-compose \
https://github.com/docker/compose/releases/download/1.25.0/run.sh &&
sudo chmod +x /usr/local/bin/docker-compose &&
sudo wget \
--output-document=/etc/bash_completion.d/docker-compose \
"https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose" &&
printf '\nDocker Compose installed successfully\n\n'
# Network-Manager
cd $WORK_PATH
sudo apt install -y network-manager network-manager-config-connectivity-ubuntu network-manager-gnome
if [[ -f /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf ]]; then
sudo rm /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf
fi
if [[ -f /etc/network/interfaces ]]; then
sudo rm /etc/network/interfaces
fi
sudo cp $WORK_PATH/network-manager/interfaces /etc/network/interfaces
sudo touch /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf
sudo cp $WORK_PATH/network-manager/01-netcfg.yaml /etc/netplan/01-netcfg.yaml
sudo apt install -y network-manager-openvpn network-manager-openvpn-gnome
# zsh
sudo apt install -y zsh
echo "y" | sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sudo chsh -s /usr/bin/zsh root
sudo chsh -s /usr/bin/zsh $USER
# google cloud cli
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
sudo apt install -y apt-transport-https ca-certificates gnupg
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
sudo apt update && sudo apt install -y google-cloud-sdk
# sdk man
curl -s "https://get.sdkman.io" | bash
# fonts
# cd $WORK_PATH
# sudo bash $WORK_PATH/nerd-fonts/install.sh
# thunar
sudo apt install -y thunar thunar-archive-plugin thunar-data thunar-media-tags-plugin thunar-vcs-plugin thunar-volman
# Space Theme
git clone https://github.com/denysdovhan/spaceship-prompt.git ~/.oh-my-zsh/themes/spaceship-prompt
ln -s ~/.oh-my-zsh/themes/spaceship-prompt/spaceship.zsh-theme ~/.oh-my-zsh/themes/spaceship.zsh-theme
# ZSH Auto-Complete Suggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# ZSH Syntax Highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# handle emojis (disabled)
echo "run_im xim" >~/.xinputrc
# launch code with support for `ctrl+shift+e`
sudo cp $WORK_PATH/desktop-entries/code.desktop /usr/share/applications/code.desktop
# CleanUp
cd ~/
sudo rm -rf ~/temporary-linux-setupsudo
# Complete
echo "Installation Completed! Rebooting in 10"
sleep 10
sudo reboot