-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
264 lines (236 loc) · 11.2 KB
/
Makefile
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
262
263
264
PROJECTS_PATH := $(if $(PROJECTS_PATH),$(PROJECTS_PATH),~/projects)
SHELL := /bin/bash
default: help
help:
@grep -E '^[a-zA-Z0-9 -]+:.*#' Makefile | sort | while read -r l; do printf "\033[1;32m$$(echo $$l | cut -f 1 -d':')\033[00m:$$(echo $$l | cut -f 2- -d'#')\n"; done
appimage-launcher: # Helper application for Linux distributions serving as a kind of "entry point" for running and integrating AppImages
curl -L `curl -s https://api.github.com/repos/TheAssassin/AppImageLauncher/releases/latest | jq -r ".assets[] | select(.name | test(\"bionic_amd64\")) | .browser_download_url"` -o appimage.deb
sudo dpkg -i appimage.deb
rm appimage.deb
essentials: # Essentials binaries
sudo apt update
sudo apt install -y \
curl \
flatpak \
htop \
jq \
meld \
pavucontrol \
pulseaudio-module-bluetooth \
terminator \
wget
gpg: # Setup essentials to sign git commits and configure
@read -p "Type your GPG signing key: " signingkey; \
sudo apt update; \
sudo apt install -y \
kleopatra \
scdaemon; \
git config --global user.signingkey $${signingkey} \
git config --global commit.gpgsign true
git: # Setup git with small customizations
sudo apt update
sudo apt install -y \
git
sudo pip install diff-highlight
git config --global alias.fpush "push --force-with-lease"
git config --global interactive.diffFilter diff-highlight
git config --global pager.diff 'diff-highlight | less'
git config --global pager.log 'diff-highlight | less'
git config --global pager.show 'diff-highlight | less'
github-cli: # Work seamlessly with GitHub from the command line
(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \
&& sudo mkdir -p -m 755 /etc/apt/keyrings \
&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/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
sudo apt update
sudo apt install gh
vim: # Setup my vimrc
sudo apt update
sudo apt install -y \
exuberant-ctags \
vim \
vim-gtk3
@if [ ! -d $(PROJECTS_PATH)/vimrc ]; then \
git clone https://github.com/vitormattos/vimrc.git $(PROJECTS_PATH)/vimrc; \
fi
sh $(PROJECTS_PATH)/vimrc/./install.sh
keepassxc: # Setup keepassxc
sudo add-apt-repository ppa:phoerious/keepassxc
sudo apt update
sudo apt install -y keepassxc
keepassxc-develop: # Setup keepassxc from source
@if [ ! -d $(PROJECTS_PATH)/keepassxc ]; then \
git clone https://github.com/keepassxreboot/keepassxc $(PROJECTS_PATH)/keepassxc; \
mkdir -p $(PROJECTS_PATH)/keepassxc/build; \
fi
cd $(PROJECTS_PATH)/keepassxc
sudo apt update
sudo apt install -y \
asciidoctor \
botan \
build-essential \
cmake \
libargon2-dev \
libbotan-2-dev \
libdbus-glib-1-2 \
libminizip-dev \
libpcsclite-dev \
libqrencode-dev \
libqt5svg5-dev \
libqt5x11extras5-dev \
libreadline-dev \
libusb-1.0-0-dev \
libxtst-dev \
make \
minizip \
qt5-image-formats-plugins \
qtbase5-dev \
qtbase5-private-dev \
qttools5-dev \
terminator \
zlib1g-dev
cd build
cmake -DWITH_XC_ALL=ON ..
make -j $(nproc)
sudo make install
nextcloud-desktop: # Desktop sync client for Nextcloud. Will be good to run the target appimage-launcher
mkdir -p ~/.local/opt/Application/
curl -L `curl -s https://api.github.com/repos/nextcloud-releases/desktop/releases/latest | jq -r ".assets[] | select(.name | test(\"x86_64\")) | .browser_download_url" | grep AppImage$` -o ~/.local/opt/Application/Nextcloud.appimage
chmod u+x ~/.local/opt/Application/Nextcloud.appimage
obs-flatpak: # Install OBS Studio from flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub com.obsproject.Studio
docker: # Setup docker
curl -fsSL https://get.docker.com -o get-docker.sh
DRY_RUN=1 sudo sh ./get-docker.sh
rm get-docker.sh
codium: # Binary releases of VS Code without MS branding/telemetry/licensing
echo 'deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.gpg ] https://download.vscodium.com/debs vscodium main' | sudo tee /etc/apt/sources.list.d/vscodium.list
wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg | gpg --dearmor | sudo dd of=/usr/share/keyrings/vscodium-archive-keyring.gpg
sudo apt update
sudo apt install -y codium
vscode: # VS Code
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-get update
sudo apt install apt-transport-https
sudo apt update
sudo apt install code
telegram-flatpak: # Install Telegram from flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.telegram.desktop
telegram: # Telegram oficial
curl -fSL --progress-bar https://telegram.org/dl/desktop/linux -o linux.tar.xz
@if [ -d ~/.local/opt/bin/telegram ]; then \
rm -rf ~/.local/opt/bin/telegram; \
fi
mkdir -p ~/.local/opt/
tar -xvf linux.tar.xz -C ~/.local/opt/
@if [ ! -f ~/.local/opt/bin/telegram ]; then \
ln -s ~/.local/opt/Telegram/Telegram ~/.local/opt/bin/telegram; \
fi
mkdir -p ~/.local/opt/bin/
chmod +x ~/.local/opt/bin/telegram
@if [ ! -f ~/.local/share/applications/telegram.desktop ]; then \
ln -s $(CURDIR)/assets/telegram/telegram.desktop ~/.local/share/applications/; \
fi
rm linux.tar.xz
dbeaver: # Install dbeaver
sudo wget -O /usr/share/keyrings/dbeaver.gpg.key https://dbeaver.io/debs/dbeaver.gpg.key
echo "deb [signed-by=/usr/share/keyrings/dbeaver.gpg.key] https://dbeaver.io/debs/dbeaver-ce /" | sudo tee /etc/apt/sources.list.d/dbeaver.list
sudo apt-get update && sudo apt-get install dbeaver-ce
adb: # Install adb
bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/main/install.sh)
udev: adb # Install udev rules
@if [ ! -d $(PROJECTS_PATH)/android-udev-rules ]; then \
git clone https://github.com/M0Rf30/android-udev-rules.git $(PROJECTS_PATH)/android-udev-rules; \
fi
cd $(PROJECTS_PATH)/android-udev-rules
sudo ln -sf $(PROJECTS_PATH)/android-udev-rules/51-android.rules /etc/udev/rules.d/51-android.rules
sudo chmod a+r /etc/udev/rules.d/51-android.rules
sudo cp android-udev.conf /usr/lib/sysusers.d/
sudo systemd-sysusers
sudo gpasswd -a $$USER adbusers
sudo udevadm control --reload-rules
sudo systemctl restart systemd-udevd.service
adb kill-server
bashrc: # My custom bashrc
@if [ -f ~/.bashrc ]; then \
rm -f ~/.bashrc; \
fi;
@if [ -f ~/.bash_aliases ]; then \
rm -f ~/.bash_aliases; \
fi;
ln -s $(CURDIR)/assets/bashrc/.bashrc ~/.bashrc
ln -s $(CURDIR)/assets/bashrc/.bash_aliases ~/.bash_aliases
@echo "Run the command source ~/.bashrc or restart your terminal"
gestures: # My custom gestures
@if [ ! -d $(PROJECTS_PATH)/libpinput-gestures ]; then \
git clone https://github.com/bulletmark/libinput-gestures $(PROJECTS_PATH)/libpinput-gestures; \
fi
sudo apt install python3 python3-gi meson xdotool libinput-tools gettext wmctrl
sudo $(PROJECTS_PATH)/libpinput-gestures/libinput-gestures-setup install
ln -s $(CURDIR)/assets/gestures/libinput-gestures.conf ~/.config/libinput-gestures.conf
sudo gpasswd -a $$USER input
libinput-gestures-setup autostart start
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/appstream/com.gitlab.cunidev.Gestures.flatpakref
flatpak install flathub com.gitlab.cunidev.Gestures
firefox: # Firefox without ppa
# Source: https://support.mozilla.org/en-US/kb/install-firefox-linux#w_install-firefox-deb-package-for-debian-based-distributions
sudo mkdir -p /etc/apt/keyrings
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null
echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | sudo tee -a /etc/apt/sources.list.d/mozilla.list > /dev/null
echo -e "Package: *\nPin: origin packages.mozilla.org\nPin-Priority: 1000"| sudo tee /etc/apt/preferences.d/mozilla
firefox-developer: # Firefox developer edition
mkdir -p ~/.local/opt
curl -fSL --progress-bar "https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux64&lang=en-US" -o firefox.tar.bz2
@if [ -d ~/.local/opt/firefox-developer ]; then \
rm -rf ~/.local/opt/firefox-developer; \
fi
mkdir -p ~/.local/opt/firefox-developer-tmp
tar -xvf firefox.tar.bz2 -C ~/.local/opt/firefox-developer-tmp
mv ~/.local/opt/firefox-developer-tmp/firefox ~/.local/opt/firefox-developer/
rm -rf ~/.local/opt/firefox-developer-tmp/
@if [ ! -f ~/.local/opt/bin/firefox-developer ]; then \
ln -s ~/.local/opt/firefox-developer/firefox ~/.local/opt/bin/firefox-developer; \
fi
@if [ ! -f ~/.local/share/applications/firefox_dev.desktop ]; then \
ln -s $(CURDIR)/assets/firefox-developer/firefox_dev.desktop ~/.local/share/applications/; \
fi
rm firefox.tar.bz2
onlyoffice-desktop: # ONLYOFFICE Desktop
# Source: https://helpcenter.onlyoffice.com/installation/desktop-install-ubuntu.aspx
# Add GPG key
mkdir -p -m 700 ~/.gnupg
gpg --no-default-keyring --keyring gnupg-ring:/tmp/onlyoffice.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5
chmod 644 /tmp/onlyoffice.gpg
sudo chown root:root /tmp/onlyoffice.gpg
sudo mv /tmp/onlyoffice.gpg /usr/share/keyrings/onlyoffice.gpg
# Add desktop editors repository
echo 'deb [signed-by=/usr/share/keyrings/onlyoffice.gpg] https://download.onlyoffice.com/repo/debian squeeze main' | sudo tee -a /etc/apt/sources.list.d/onlyoffice.list
# Update the package manager cache:
sudo apt-get update
# Now the editors can be easily installed using the following command:
sudo apt-get install onlyoffice-desktopeditors
youtube-dl: # A youtube-dl fork with additional features and fixes
# Reference: https://github.com/yt-dlp/yt-dlp/wiki/Installation#apt
sudo add-apt-repository ppa:tomtomtom/yt-dlp # Add ppa repo to apt
sudo apt update # Update package list
sudo apt install yt-dlp # Install yt-dlp
act: # Run your GitHub Actions locally
mkdir -p $(PROJECTS_PATH)/act
wget -O $(PROJECTS_PATH)/act/install.sh https://raw.githubusercontent.com/nektos/act/master/install.sh
mkdir -p ~/.local/opt/bin
sh $(PROJECTS_PATH)/act/install.sh -b ~/.local/opt/bin
slim: # Slim(toolkit). Don't change anything in your container image and minify it by up to 30x making it secure too!
curl -sL https://raw.githubusercontent.com/slimtoolkit/slim/master/scripts/install-slim.sh | sudo -E bash -
insomnia: # Insomnia API client
mkdir -p ~/.local/opt/Application/
curl -L `curl -s https://api.github.com/repos/Kong/insomnia/releases/latest | jq -r ".assets[] | select(.name | test(\"AppImage\")) | .browser_download_url"` -o ~/.local/opt/Application/insomnia.appimage
chmod u+x ~/.local/opt/Application/insomnia.appimage