This repository has been archived by the owner on Jan 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
install.sh
executable file
·211 lines (176 loc) · 7.39 KB
/
install.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
#!/bin/bash
start_green="\033[92m"
end_green="\033[39m"
current=${PWD}
# Create home directory folders
mkdir -p ~/.config
mkdir -p ~/bin
mkdir -p ~/Pictures
mkdir -p ~/.local/share/applications
mkdir -p ~/.local/share/fonts
mkdir -p ~/logs
echo -e "\n${start_green} Installing base apps...${end_green}"
sudo apt install \
ack \
bash \
blueman \
bolt \
brightnessctl \
curl \
evolution \
fish \
direnv \
thefuck \
lxpolkit \
fonts-noto-core \
gvfs-fuse \
htop \
intel-gpu-tools \
jq \
grim \
libfdk-aac2 \
libglib2.0-bin \
libinput-tools \
libmpdclient2 \
libnl-3-200 \
libnotify4 \
libnotify-bin \
libspa-0.2-bluetooth \
moreutils \
mpc \
pamixer \
playerctl \
powertop \
pulsemixer \
pulseaudio-utils \
python3-pip \
gir1.2-playerctl-2.0 \
units \
sanoid \
slurp \
tlp \
wl-clipboard \
wget \
wmctrl \
xdotool
sudo apt install --no-install-recommends \
gnome-tweaks \
golang-go \
virtualbox-qt \
yarnpkg
sudo apt autoremove --purge \
thunderbird
echo -e "\n${start_green} Installing third party PPAs and apps...${end_green}"
# PPAs
sudo add-apt-repository -y ppa:mozillateam/firefox-next
sudo add-apt-repository -y ppa:ubuntu-mozilla-daily/ppa
sudo add-apt-repository -y ppa:daniruiz/flat-remix
sudo add-apt-repository -y ppa:agornostal/ulauncher
sudo add-apt-repository -y ppa:solaar-unifying/stable
sudo add-apt-repository -y ppa:danielrichter2007/grub-customizer
# Install chrome (installs both chrome stable + repository)
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
rm google-chrome-stable_current_amd64.deb
# Wallpaper manager
pipx install waypaper
# Install all the rest of them things
sudo apt install \
grub-customizer \
google-chrome-stable \
firefox \
firefox-trunk \
solaar \
ulauncher
# Installing chrome unstable duplicates the same chrome repo created when installing chrome stable, under a difrerent file
sudo rm -f /etc/apt/sources.list.d/google-chrome-unstable.list*
echo -e "\n${start_green} Installing snap apps...${end_green}"
sudo snap install chromium --channel latest/edge
sudo snap install youtube-dl
sudo snap install spotify
sudo snap install kubectl --classic
sudo snap install google-cloud-sdk --classic
sudo snap install code --classic
sudo snap install phpstorm --classic
sudo snap install pycharm-professional --classic
# Try installing Slack. The snap version is a pain to use as links do not open on the current browser session
# We should be able to revert to it after https://bugs.launchpad.net/snapd/+bug/1835024/ is fixed
slack_link=$(curl -sS https://slack.com/intl/en-gb/downloads/instructions/ubuntu | grep "https://downloads.slack-edge.com/linux_releases/slack-desktop-[0-9.-]*-amd64.deb" -o)
echo -e "\n${start_green} Attempting to install slack from their website...${end_green}"
if [[ "${slack_link}" != "" ]]; then
echo -e "\n${start_green} Found download link ${slack_link} ${end_green}"
slack_deb=/tmp/slack.deb
wget https://downloads.slack-edge.com/linux_releases/slack-desktop-4.10.3-amd64.deb -O "${slack_deb}"
sudo dpkg -i ${slack_deb}
rm ${slack_deb}
echo -e "\n${start_green} Slack installed${end_green}"
else
echo -e "\n${start_green} Could not find slack link on their website. Try installing by hand from https://slack.com/intl/en-gb/downloads/linux${end_green}"
fi
sudo ln -sf $(which yarnpkg) /usr/bin/yarn
echo -e "\n${start_green} Fixing brightness controls for ${USER}...${end_green}"
sudo cp assets/90-brightnessctl.rules /etc/udev/rules.d/
sudo usermod -a -G video $(whoami)
echo -e "\n${start_green} Libinput festures for ${USER}...${end_green}"
sudo usermod -a -G input $(whoami)
echo -e "\n${start_green} Setting longid config...${end_green}"
sudo cp /etc/systemd/logind.conf /etc/systemd/logind.conf-bak
sudo cp assets/logind.conf /etc/systemd/logind.conf
sudo cp assets/etc-sysctl.d-jetbrains-inotify.conf /etc/sysctl.d/99-jetbrains-inotify.conf
sudo cp assets/etc-modprobe-d-audio-powersave.conf /etc/modprobe.d/audio-powersave.conf
sudo cp assets/etc-vbox-networks.conf /etc/vbox/networks.conf
sudo cp assets/etc-apt-preferencesd-firefox-apt-ppa /etc/apt/preferences.d/firefox-apt-ppa
sudo cp assets/etc-apt-preferencesd-disable-grub /etc/apt/preferences.d/disable-grub
mkdir -p /etc/sanoid/sanoid.conf
sudo cp assets/etc-sanoid-sanoid.conf /etc/sanoid/sanoid.conf
# Ensure containers DNS is independent of my home DNS
sudo mkdir -p /etc/docker
sudo cp assets/etc-docker-daemon.json /etc/docker/daemon.json
# Disable unattended-upgrades from updating firefox
cat <<EOF | sudo tee /etc/apt/apt.conf.d/99unattended-upgrades-firefox
Unattended-Upgrade::Package-Blacklist {
// Disable unattended firefox upgrades to avoid undesired forced restarts
"firefox";
};
EOF
echo -e "\n${start_green} Fixing snap apps in menu... ${end_green}"
snap_apps_fix=/etc/profile.d/apps-bin-path.sh
if [[ ! -f "${snap_apps_fix}" ]]; then
sudo cp scripts/snap-apps-fix.sh ${snap_apps_fix}
fi
echo -e "\n${start_green} Linking sway config folders into ~/.config... ${end_green}"
folders_to_linky=("configs/sway" "configs/waybar" "configs/kanshi" "configs/rofi" "configs/mako" "assets/icons" "configs/swaylock" "configs/mpv" "configs/environment.d" "configs/xdg-desktop-portal-wlr" "configs/ulauncher")
for folder in ${folders_to_linky[@]}; do
if [[ ! -e "${HOME}/.config/${folder}" ]]; then
ln -sf ${PWD}/${folder}/ "${HOME}/.config/"
fi
done
ln -sf ${current}/configs/libinput-gestures.conf ~/.config/
echo -e "\n${start_green} Installing assets (backgrounds, fonts, app desktop files... ${end_green}"
ln -sf ${current}/assets/backgrounds ~/Pictures/
ln -sf ${current}/assets/fonts/* ~/.local/share/fonts/
# Install Scripts in bin folder
ln -sf ${current}/scripts/notifications/brightness-notification.sh ~/bin/
ln -sf ${current}/scripts/notifications/audio-notification.sh ~/bin/
ln -sf ${current}/scripts/button.sh ~/bin/
ln -sf ${current}/scripts/network-manager ~/bin/
ln -sf ${current}/scripts/docker ~/bin/
ln -sf ${current}/scripts/screenshots.sh ~/bin/
ln -sf ${current}/notify-send.sh/notify-*.sh ~/bin/
ln -sf ${current}/ssway ~/bin/
# Install login session
sudo mkdir -p /usr/share/wayland-sessions/
sudo cp ${current}/ssway /usr/bin/ssway
sudo cp ${current}/swayfire /usr/bin/swayfire
sudo cp ${current}/assets/ubuntu-wayfire.desktop /usr/share/wayland-sessions/
sudo cp ${current}/assets/ubuntu-sway.desktop /usr/share/wayland-sessions/
sudo cp ${current}/assets/ubuntu-sway-debug.desktop /usr/share/wayland-sessions/
# For autotiling [email protected]:nwg-piotr/autotiling.git
pip3 install i3ipc
ln -sf ${current}/scripts/autotiling/autotiling.py ~/bin/
# Reduce boot times
sudo systemctl disable NetworkManager-wait-online.service
sudo systemctl disable gpu-manager.service
# Tweak systemd boot & shutdown not to hang on stuck services for too long
sudo sed --in-place=bak1 's/#DefaultTimeoutStartSec=90s/DefaultTimeoutStartSec=15s/g' /etc/systemd/system.conf
sudo sed --in-place=bak2 's/#DefaultTimeoutStopSec=90s/DefaultTimeoutStopSec=15s/g' /etc/systemd/system.conf