Skip to content

Commit 31300e9

Browse files
committed
added lazy-script
1 parent e0830c0 commit 31300e9

File tree

1 file changed

+128
-0
lines changed

1 file changed

+128
-0
lines changed

lazy-script.sh

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# check if root
6+
if [[ $EUID -ne 0 ]]; then
7+
echo -e "error: you must be a root user to run this script. \nplease run 'sudo $0'" >&2
8+
exit 1
9+
fi
10+
11+
# update system packages
12+
apt update && apt upgrade -y
13+
14+
# disable snapd services
15+
systemctl disable snapd.service
16+
systemctl disable snapd.socket
17+
systemctl disable snapd.seeded.service
18+
19+
# remove snap packages
20+
snap list | awk '{print $1}' > ./snap-packages.txt
21+
tac ./snap-packages.txt | xargs snap remove
22+
23+
# remove snapd files and directories
24+
rm -rf /var/cache/snapd/
25+
apt autoremove --purge snapd
26+
rm -rf ~/snap ./snap-packages.txt
27+
28+
# update system packages
29+
apt update && apt upgrade -y
30+
31+
# install media codecs
32+
apt install ubuntu-restricted-extras -y
33+
34+
# install cli tools and applications
35+
apt install wget git curl emacs nano vim neovim unzip -y
36+
37+
# install common dev-tools and dependencies
38+
apt install apt-transport-https build-essential ca-certificates gnupg gnupg-agent gcc g++ cmake lsb-release nodejs npm software-properties-common python3 apache2 nginx -y
39+
40+
# install more cli tools and applications
41+
apt install bat cmatrix exa figlet fortune-mod lolcat neofetch parallel speedtest-cli trash-cli -y
42+
43+
# download deb-packages for some common applications
44+
mkdir -p deb-packages/ && cd deb-packages/
45+
wget 'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64' -O code.deb
46+
wget 'https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb' -O google-chrome.deb
47+
wget 'https://github.com/dandavison/delta/releases/download/0.8.3/git-delta_0.8.3_amd64.deb' -O git-delta.deb
48+
wget 'https://releases.hyper.is/download/deb' -O hyper-term.deb
49+
wget 'https://updates.getmailspring.com/download?platform=linuxDeb' -O mailspring.deb
50+
wget 'https://downloads.slack-edge.com/linux_releases/slack-desktop-4.20.0-amd64.deb' -O slack.deb
51+
52+
# install downloaded deb-packages
53+
dpkg -i code.deb google-chrome.deb git-delta.deb hyper-term.deb mailspring.deb slack.deb -y
54+
55+
# remove downloaded deb-packages
56+
cd ../ && rm -rf ./deb-packages
57+
58+
# download zip files for some more applications
59+
mkdir -p zips && cd zips/
60+
wget 'https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip' -O aws-cli.zip
61+
62+
# unzip and install downloaded zips
63+
unzip aws-cli.zip
64+
bash ./aws/install
65+
66+
# remove downloaded zips
67+
cd ../ && rm -rf ./zips
68+
69+
# add common repositories and keyrings
70+
apt-add-repository ppa:ansible/ansible
71+
mkdir -p /etc/apt/keyrings
72+
curl -fsSL 'https://pkg.cloudflare.com/cloudflare-main.gpg' | tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null
73+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/cloudflare-main.gpg] 'https://pkg.cloudflare.com/cloudflared' $(lsb_release -cs)" | tee /etc/apt/sources.list.d/cloudflared.list > /dev/null
74+
curl -fsSL 'https://download.docker.com/linux/ubuntu/gpg' | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
75+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] 'https://download.docker.com/linux/ubuntu' $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
76+
77+
# update system packages
78+
apt update && apt upgrade -y
79+
80+
# install more dev-tools from added repositories
81+
apt install ansible cloudflared docker-ce docker-ce-cli containerd.io docker-compose-plugin -y
82+
83+
# add user group for docker
84+
groupadd docker
85+
usermod -aG docker $USER
86+
87+
# install nvm
88+
curl 'https://raw.githubusercontent.com/creationix/nvm/master/install.sh' | bash
89+
90+
# install common gnome-tools
91+
apt install gnome-tweaks gnome-shell-extension-manager chrome-gnome-shell -y
92+
apt install --install-suggests gnome-software -y && flatpak remote-add --if-not-exists flathub 'https://flathub.org/repo/flathub.flatpakrepo'
93+
94+
# install gnome-extensions
95+
gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com
96+
gnome-extensions enable Hide_Activities@shay.shayel.org
97+
gnome-extensions enable openweather-extension@jenslody.de
98+
gnome-extensions enable search-light@icedman.github.com
99+
gnome-extensions enable rocketbar@chepkun.github.com
100+
gnome-extensions enable openweather-extension@jenslody.d
101+
gnome-extensions enable clipboard-history@alexsaveau.dev
102+
gnome-extensions enable burn-my-windows@schneegans.github.com
103+
104+
# download theme -- nord
105+
git clone 'https://github.com/EliverLara/Nordic.git' /usr/share/themes/nordify
106+
107+
# install cursor -- nordzy
108+
git clone 'https://github.com/alvatip/Nordzy-cursors' nordzy-cursors
109+
bash ./nordzy-cursors/install.sh
110+
111+
# download fonts
112+
apt install fonts-font-awesome
113+
wget 'https://github.com/ryanoasis/nerd-fonts/releases/latest/download/FiraCode.zip' -O fira-code.zip
114+
wget 'https://github.com/ryanoasis/nerd-fonts/releases/latest/download/Meslo.zip' -O meslo.zip
115+
wget 'https://github.com/todylu/monaco.ttf/raw/master/monaco.ttf' -O Monaco.ttf
116+
117+
# install fonts
118+
unzip meslo.zip -d /usr/share/fonts && unzip fira-code.zip -d /usr/share/fonts
119+
mv Monaco.ttf /usr/share/fonts
120+
fc-cache -vf
121+
122+
# remove unwanted files and directories
123+
rm -rf fira-code.zip meslo.zip nordzy-cursors
124+
125+
# print banger message on completion
126+
echo -e "\n\n\e[1;96m---------------------------------------------------"
127+
echo -e "| 🎉 Congratulations! Your System Is Epic! 🎉 |"
128+
echo -e "---------------------------------------------------\e[0m\n"

0 commit comments

Comments
 (0)