-
Notifications
You must be signed in to change notification settings - Fork 0
/
TerminalRicingArch.sh
416 lines (374 loc) · 22.5 KB
/
TerminalRicingArch.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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
#!/bin/bash
cat << "EOF"
⠀⠀⠀⠀⠀⠀⠀⠀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣼⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⣸⣿⣿⣷⣤⣴⣦⣀⣠⣶⡶⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⢠⣄⡀⠀⣼⣿⣿⣿⣿⡿⣿⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠘⣿⣿⣿⣿⣿⣿⣿⡾⢛⠋⡛⠻⣿⣿⣿⣿⣧⣴⣶⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⢸⣿⣿⣿⣿⣽⡏⠰⡈⢆⢡⣷⢀⠻⣿⣿⣿⣿⣇⡀⢀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⢻⣿⣿⣿⣻⣿⠄⢣⠘⡄⢺⡏⢄⢣⡌⠻⣿⣿⣿⣿⣿⣿⣷⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣷⣶⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣀⣸⣿⣿⣿⣿⣿⡏⢄⠣⢌⣹⠇⡌⣼⢇⠱⡈⠿⣿⣿⣿⡿⠿⠛⠛⠛⠛⠛⠛⠛⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠹⢿⣿⣿⣿⣷⣿⣿⣦⠑⣂⡿⠰⡐⡿⢈⠆⡑⢢⢙⡿⢉⠐⡠⠑⣈⠂⠥⠘⡀⢃⠰⠀⡌⠙⠯⣉⢩⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠈⠹⣿⣿⣿⣽⣿⣷⣜⠏⡰⢱⡟⡠⢊⠔⣡⡿⢁⠂⡡⠄⢡⠠⠌⢠⠁⠒⡈⠄⡡⢀⠃⠤⣹⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠈⣻⣿⣿⣿⣿⣿⣷⣤⠹⢇⠰⡁⢎⣾⠁⠂⡔⠠⠘⡀⢂⠌⠄⠌⠡⡐⢈⡐⠄⢊⣼⣿⣿⣿⣿⣿⡃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠙⠛⠛⢻⣿⣿⣯⣿⣿⣷⣌⠢⠑⢬⡇⠌⠡⠠⠑⢂⢁⢢⡈⠌⡐⠡⠠⢁⡐⠈⢼⣿⣿⣿⣿⡿⢁⢻⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠈⣻⣿⣿⣿⣿⣿⣧⣍⢾⠃⠌⢂⡁⢎⣶⣿⣯⣭⡘⠰⡡⢁⠂⠤⢉⠈⠿⣿⣿⠟⢀⠂⠄⠛⣧⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⡿⡙⢹⣿⣿⣿⣿⣿⣿⠈⠔⠂⢤⣿⣿⣿⣿⣿⣅⠀⠹⠄⡘⢀⢂⠡⠂⢄⠠⢈⠄⠊⠌⡐⢉⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⢰⡇⡇⣾⣿⣿⡿⣿⣿⣿⡈⠄⢃⠘⣿⣿⣿⣿⣿⣿⠀⢠⠃⠄⠃⠄⡂⢉⠄⢂⠡⢈⠌⡐⢈⠄⡘⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇⣓⡘⠿⣿⢷⠙⠛⣻⠡⢈⠄⢊⡘⢿⢿⠿⠟⠃⢠⠞⣨⠐⡉⡐⢈⠤⠈⡄⢂⡁⢂⠌⠄⡂⠔⠘⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⣯⠱⢈⠐⠂⢾⣁⣂⣽⣆⠂⣌⣼⠇⠠⢉⠐⡀⠉⠤⢈⠳⠇⡐⠠⢁⠂⡡⠐⡠⠐⠂⠌⡐⠐⡨⠐⠸⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣇⠂⠌⣁⠂⡉⢹⣟⣿⣻⡯⠁⠌⢂⡁⠢⢈⢁⠒⠠⠒⡀⠆⣁⠂⠡⠄⡑⠠⠑⣈⠐⡈⠔⠠⠑⢂⢹⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣧⠌⣀⠒⡈⡐⠻⣮⡷⠃⠌⢂⠡⠠⠑⣀⠊⠄⡑⠠⢁⠂⠤⢈⠁⠆⡐⠡⠌⣀⠂⠡⠌⢂⠡⢂⠘⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢳⣤⠒⠠⠐⠡⣀⠐⡈⠔⡈⠤⠑⡈⠄⠌⡐⢈⡁⢂⠡⠒⡈⠰⠈⢄⡁⠆⠠⠌⠡⣈⠐⡐⡈⠌⣻⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢷⡈⠅⠒⡀⢂⠁⠆⠰⠀⡅⠂⠌⠒⡈⠄⠰⠈⢄⠡⠐⠡⠌⢠⠐⡈⢡⠈⠔⡀⠒⢠⠐⡈⣿⡃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠠⢁⠂⢿⡆⠌⡁⢺⠇⡁⢊⠐⣄⠉⠄⠃⡄⠊⠌⡐⠌⡀⠆⡁⢂⠌⡐⠠⠉⠄⢂⠁⣾⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠀⠀⠀⠘⣧⠒⡈⠄⢶⢀⠡⡞⡐⠠⢁⣞⠂⢌⠘⢠⠐⣡⡬⠴⢒⠃⡐⡈⠄⢂⠌⠡⠘⡈⠄⢊⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⠹⣧⠀⢀⣤⠾⢷⡐⡈⢼⡆⢸⡇⠡⢘⣼⢳⡿⣦⠈⣤⠿⢁⢂⠁⠆⡈⠔⠠⢁⠊⠄⡡⠡⢐⠈⣼⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇⢃⢹⡷⠋⢄⠂⠜⠹⢶⠾⢁⠚⢿⡴⠟⢡⣿⠓⠸⣿⠋⡐⠄⢂⠉⡐⡐⠨⠐⠡⡈⢄⡛⢁⠂⣸⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⢰⠀⡂⠿⠈⢄⡈⢂⡁⢂⠐⠂⡌⠠⠐⡈⠴⣿⢀⠡⠘⣆⠰⢈⠂⢡⠐⣀⠃⠡⢒⡼⠋⡐⠈⣴⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⡀⠆⡁⢂⠡⢂⠐⡠⠐⡈⠄⠃⡄⠡⢁⠂⢼⣿⠀⠂⡅⢂⡐⠂⠌⢤⣒⠠⠬⠓⡉⠄⢒⣠⡿⠛⢶⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠷⠶⠶⢧⠶⡶⢶⠶⡷⢶⠾⡶⢶⠷⡶⠾⠼⢿⣠⣁⣐⣠⣀⣉⣒⣰⣂⣦⣥⣖⣴⠮⠿⠳⠶⠾⠴⠿⠿⠿⠳⠶⣦⣀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣦⣶⣼⡟⠃⠀⠀⠀⠀⠀⠃⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠻⠿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
_____ _____ _____ _____ _ _ _____ _
| __ \|_ _/ ____|_ _| \ | |/ ____| | |
| |__) | | || | | | | \| | | __ __ _ ___ | |__ _ __ _ __ _ __ _ __
| _ / | || | | | | . ` | | |_ | / _` |/ _ \ | '_ \| '__| '__| '__| '__|
| | \ \ _| || |____ _| |_| |\ | |__| | | (_| | (_) | | |_) | | | | | | | |
|_| \_\_____\_____|_____|_| \_|\_____| \__, |\___/ |_.__/|_| |_| |_| |_|
__/ |
|___/
EOF
if ! pacman -Qi gum &> /dev/null; then
sudo pacman -S --needed --noconfirm gum > /dev/null
fi
echo "Auto or Personnalized"
auto=$(gum choose --cursor.foreground="#F00" --height 2 --limit 1 Auto Personnalized)
if [ "$auto" = "Personnalized" ]; then
IFS=$'\n' read -r -d '' -a choices < <(gum choose --cursor.foreground="#F00" --height 27 --limit 27 "YAY (Yet Another Yogurt - An AUR Helper)" "HUNT (A simplified Find command made with Rust)" "DOOIT (A todo manager)" "PLOW (An HTTP(S) benchmarking tool)" "CATP (Print the output of a running process)" "CURL-IMPERSONATE (A special build of curl)" "NTFY (Send push notifications to your phone or desktop)" "JQP (A TUI playground for exploring jq)" "K9S (Kubernetes CLI)" "NNN (A full-featured terminal file manager)" "NCDU (A disk utility for Unix systems)" "SSH-TOOLS (Making SSH more convenient)" "NALA (A front-end for libapt-pkg)" "NEOFETCH (A command-line system information tool)" "OTS (Share end-to-end encrypted secrets)" "BOTTOM (A graphical process/system monitor)" "VIDDY (A modern watch command)" "HTMLQ (Like jq, but for HTML)" "SYSZ (A terminal UI for systemctl)" "PUEUE (A command-line task management tool)" "VIZEX (Visualize disk space usage)" "GPING (Ping, but with a graph)" "TEMPMAIL (A temporary email right from your terminal)" "BAT (A cat clone with syntax highlighting)" "NAVI (An interactive cheatsheet tool)" "MILLER (Like awk, sed, cut, join, and sort for data formats)" && printf '\0')
fi
# Function to install YAY
install_yay() {
if ! command -v yay &> /dev/null; then
sudo gum spin --spinner moon --title.foreground="#239B56" --title "Installing : git base-devel" -- bash -c "pacman -S --needed --noconfirm git base-devel"
git clone https://aur.archlinux.org/yay.git
cd yay && makepkg -si && cd .. && rm -rf yay
else
echo "YAY is already installed." | gum style --foreground="#F5B041" --border-foreground="#F5B041" --border rounded --align center
fi
}
# Function to install HUNT
install_hunt() {
if ! command -v cargo &> /dev/null; then
sudo gum spin --spinner moon --title.foreground="#239B56" --title "Installing : rust" -- bash -c "pacman -S --needed --noconfirm rust"
fi
if ! command -V hunt &> /dev/null; then
cargo install hunt
else
echo "Hunt is already installed." | gum style --foreground="#F5B041" --border-foreground="#F5B041" --border rounded --align center
fi
}
# Function to install DOOIT
install_dooit() {
install_yay
if ! pacman -Qi dooit-git &> /dev/null; then
yay -S --noconfirm dooit-git
else
echo "dooit-git is already installed." | gum style --foreground="#F5B041" --border-foreground="#F5B041" --border rounded --align center
fi
}
# Function to install PLOW
install_plow() {
install_yay
if ! pacman -Qi plow &> /dev/null; then
yay -S --noconfirm plow
else
echo "plow is already installed." | gum style --foreground="#F5B041" --border-foreground="#F5B041" --border rounded --align center
fi
}
# Function to install CATP
install_catp() {
if ! command -v catp &> /dev/null; then
wget https://github.com/rapiz1/catp/releases/download/v0.2.0/catp-x86_64-unknown-linux-gnu.zip -O /tmp/catp.zip
sudo unzip -o /tmp/catp.zip -d /usr/local/bin/ && sudo chmod +x /usr/local/bin/catp && rm /tmp/catp.zip
else
echo "catp is already installed." | gum style --foreground="#F5B041" --border-foreground="#F5B041" --border rounded --align center
fi
}
# Function to install CURL-IMPERSONATE
install_curl_impersonate() {
if ! command -v curl_chrome100 &> /dev/null; then
sudo pacman -S --needed --noconfirm nss ca-certificates wget
sudo wget https://github.com/lwthiker/curl-impersonate/releases/download/v0.6.0-alpha.1/curl-impersonate-v0.6.0-alpha.1.aarch64-linux-gnu.tar.gz -O /usr/local/bin/curl-imp.tar.gz
sudo tar -xvf /usr/local/bin/curl-imp.tar.gz -C /usr/local/bin && sudo chmod +x /usr/local/bin/curl* && sudo rm /usr/local/bin/curl-imp.tar.gz
else
echo "Curl_impersonate is already installed." | gum style --foreground="#F5B041" --border-foreground="#F5B041" --border rounded --align center
fi
}
# Function to install NTFY
install_ntfy() {
install_yay
if ! pacman -Qi ntfysh-bin &> /dev/null; then
yay -S --noconfirm ntfysh-bin
else
echo "ntfysh-bin is already installed." | gum style --foreground="#F5B041" --border-foreground="#F5B041" --border rounded --align center
fi
}
# Function to install JQP
install_jqp() {
install_yay
if ! pacman -Qi jqp-bin &> /dev/null; then
yay -S --noconfirm jqp-bin
else
echo "jqp-bin is already installed." | gum style --foreground="#F5B041" --border-foreground="#F5B041" --border rounded --align center
fi
}
# Function to install K9S
install_k9s() {
sudo gum spin --spinner moon --title.foreground="#239B56" --title "Installing : k9s" -- bash -c "pacman -S --needed --noconfirm k9s"
}
# Function to install NEOFETCH
install_neofetch() {
sudo gum spin --spinner moon --title.foreground="#239B56" --title "Installing : neofetch" -- bash -c "pacman -S --needed --noconfirm neofetch"
}
# Function to install OTS
install_ots() {
if ! command -v go &> /dev/null; then
sudo gum spin --spinner moon --title.foreground="#239B56" --title "Installing : go" -- bash -c "pacman -S --needed --noconfirm go"
fi
sudo go install github.com/sniptt-official/ots@latest
}
# Function to install BOTTOM
install_bottom() {
sudo gum spin --spinner moon --title.foreground="#239B56" --title "Installing : bottom" -- bash -c "pacman -S --needed --noconfirm bottom"
}
# Function to install VIDDY
install_viddy() {
install_yay
if ! pacman -Qi viddy &> /dev/null; then
yay -S --noconfirm viddy
else
echo "viddy is already installed." | gum style --foreground="#F5B041" --border-foreground="#F5B041" --border rounded --align center
fi
}
# Function to install HTMLQ
install_htmlq() {
if ! command -v cargo &> /dev/null; then
sudo gum spin --spinner moon --title.foreground="#239B56" --title "Installing : rust" -- bash -c "pacman -S --needed --noconfirm rust"
fi
cargo install htmlq
}
# Function to install SYSZ
install_sysz() {
install_yay
if ! pacman -Qi sysz &> /dev/null; then
yay -S --noconfirm sysz
else
echo "sysz is already installed." | gum style --foreground="#F5B041" --border-foreground="#F5B041" --border rounded --align center
fi
}
# Function to install PUEUE
install_pueue() {
sudo gum spin --spinner moon --title.foreground="#239B56" --title "Installing : pueue" -- bash -c "pacman -S --needed --noconfirm pueue"
}
# Function to install VIZEX
install_vizex() {
install_yay
if ! pacman -Qi vizex &> /dev/null; then
yay -S --noconfirm vizex
else
echo "vizex is already installed." | gum style --foreground="#F5B041" --border-foreground="#F5B041" --border rounded --align center
fi
}
# Function to install GPING
install_gping() {
sudo gum spin --spinner moon --title.foreground="#239B56" --title "Installing : gping" -- bash -c "pacman -S --needed --noconfirm gping"
}
# Function to install TEMPMAIL
install_tempmail() {
install_yay
if ! pacman -Qi tmpmail-git &> /dev/null; then
yay -S --noconfirm tmpmail-git
else
echo "tmpmail-git is already installed." | gum style --foreground="#F5B041" --border-foreground="#F5B041" --border rounded --align center
fi
}
# Function to install BAT
install_bat() {
sudo gum spin --spinner moon --title.foreground="#239B56" --title "Installing : bat" -- bash -c "pacman -S --needed --noconfirm bat"
}
# Function to install NAVI
install_navi() {
sudo gum spin --spinner moon --title.foreground="#239B56" --title "Installing : navi" -- bash -c "pacman -S --needed --noconfirm navi"
}
# Function to install SSH-TOOLS
install_ssh_tools(){
sudo gum spin --spinner moon --title.foreground="#239B56" --title "Installing : ssh-tools" -- bash -c "pacman -S --needed --noconfirm ssh-tools"
}
# Function to install NCDU
install_ncdu(){
sudo gum spin --spinner moon --title.foreground="#239B56" --title "Installing : ncdu" -- bash -c "pacman -S --needed --noconfirm ncdu"
}
# Function to install NNN
install_nnn(){
sudo gum spin --spinner moon --title.foreground="#239B56" --title "Installing : nnn" -- bash -c "pacman -S --needed --noconfirm nnn"
}
# Function to install MILLER
install_miller(){
sudo gum spin --spinner moon --title.foreground="#239B56" --title "Installing : nnn" -- bash -c "pacman -S --needed --noconfirm miller"
}
################################################
gum style --foreground="#239B56" --border-foreground="#239B56" --border double --align center --padding "1 1" "Base Package"
for pkg in zsh fasd peco acpi gum unzip; do
if ! pacman -Qi $pkg &> /dev/null; then
(sudo gum spin --spinner moon --title.foreground="#239B56" --title "Installing : $pkg" -- bash -c "pacman -S --needed --noconfirm $pkg")
else
echo "$pkg is already installed." | gum style --foreground="#F5B041" --border-foreground="#F5B041" --border rounded --align center
fi
done
if [ ! -d "$HOME/.oh-my-zsh" ]; then
curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -o install_oh_my_zsh.sh
sed -i 's/exec zsh -l//g' install_oh_my_zsh.sh
sh install_oh_my_zsh.sh
else
echo "Oh My Zsh is already installed." | gum style --foreground="#F5B041" --border-foreground="#F5B041" --border rounded --align center
fi
ZSH_CUSTOM=${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}
themes_and_plugins=(
"spaceship-prompt https://github.com/spaceship-prompt/spaceship-prompt.git"
"zsh-peco-history https://github.com/jimeh/zsh-peco-history.git"
"zsh-autosuggestions https://github.com/zsh-users/zsh-autosuggestions"
"zsh-syntax-highlighting https://github.com/zsh-users/zsh-syntax-highlighting"
"you-should-use https://github.com/MichaelAquilina/zsh-you-should-use.git"
)
for item in "${themes_and_plugins[@]}"; do
read -ra ADDR <<< "$item"
if [ ! -d "$ZSH_CUSTOM/${ADDR[0]}" ]; then
git clone "${ADDR[1]}" "$ZSH_CUSTOM/${ADDR[0]}" --depth=1
else
echo "${ADDR[0]} is already cloned." | gum style --foreground="#F5B041" --border-foreground="#F5B041" --border rounded --align center
fi
done
if [ ! -f "$ZSH_CUSTOM/themes/spaceship.zsh-theme" ]; then
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
fi
sed -i '/^ZSH_THEME=/c\ZSH_THEME="spaceship"' ~/.zshrc
sed -i '/^plugins=(/c\plugins=(git fasd zsh-peco-history zsh-autosuggestions zsh-syntax-highlighting you-should-use docker archlinux ansible aws azure battery colored-man-pages colorize command-not-found docker-compose rsync rust terraform zsh-interactive-cd)' ~/.zshrc
if ! grep -q 'export PATH="$HOME/.cargo/bin:$PATH"' ~/.zshrc; then
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.zshrc
fi
if ! grep -q 'export PATH="$PATH:$(go env GOBIN):$(go env GOPATH)/bin"' ~/.zshrc; then
echo 'export PATH="$PATH:$(go env GOBIN):$(go env GOPATH)/bin"' >> ~/.zshrc
fi
if ! grep -q "alias cdi='cd \$(ls | peco)'" ~/.zshrc; then
echo "alias cdi='cd \$(ls | peco)'" >> ~/.zshrc
fi
if ! grep -q "alias -g xcopy='xclip -selection clipboard'" ~/.zshrc; then
echo "alias -g xcopy='xclip -selection clipboard'" >> ~/.zshrc
fi
if ! grep -q "alias -g xpaste='xclip -selection clipboard -o'" ~/.zshrc; then
echo "alias -g xpaste='xclip -selection clipboard -o'" >> ~/.zshrc
fi
if ! grep -q "neofetch" ~/.zshrc; then
echo "neofetch" >> ~/.zshrc
fi
mkdir -p ~/.config && touch ~/.config/spaceship.zsh
cat << "EOF" > ~/.config/spaceship.zsh
SPACESHIP_PROMPT_ORDER=(
time # Time stamps section
user # Username section
dir # Current directory section
host # Hostname section
git # Git section (git_branch + git_status)
python
hg # Mercurial section (hg_branch + hg_status)
exec_time # Execution time
line_sep # Line break
battery # Battery level and status
jobs # Background jobs indicator
exit_code # Exit code section
sudo # Sudo indicator
char # Prompt character
)
SPACESHIP_TIME_SHOW=true
SPACESHIP_USER_SHOW=always
SPACESHIP_PROMPT_ADD_NEWLINE=false
SPACESHIP_CHAR_SYMBOL="❯"
SPACESHIP_CHAR_SUFFIX=" "
SPACESHIP_DIR_COLOR=red
SPACESHIP_USER_COLOR=red
SPACESHIP_TIME_FORMAT='%D{%H:%M}'
SPACESHIP_TIME_COLOR=red
EOF
####################################
gum style --foreground="#239B56" --border-foreground="#239B56" --border double --align center --padding "1 1" "Extended Tools"
if [ "$auto" = "Auto" ]; then
pacman_packages=(bottom nnn ncdu ssh-tools pueue gping bat navi rust k9s neofetch go miller)
for pkg in "${pacman_packages[@]}"; do
if ! pacman -Qi $pkg &> /dev/null; then
(sudo gum spin --spinner moon --title.foreground="#239B56" --title "Installing : $pkg" -- bash -c "pacman -S --needed --noconfirm $pkg")
else
echo "$pkg is already installed." | gum style --foreground="#F5B041" --border-foreground="#F5B041" --border rounded --align center
fi
done
declare -A custom_installs=(
["yay"]="install_yay"
["hunt"]="install_hunt"
["dooit"]="install_dooit"
["plow"]="install_plow"
["catp"]="install_catp"
["curl_impersonate"]="install_curl_impersonate"
["ntfy"]="install_ntfy"
["jqp"]="install_jqp"
["ots"]="install_ots"
["viddy"]="install_viddy"
["htmlq"]="install_htmlq"
["sysz"]="install_sysz"
["vizex"]="install_vizex"
["tempmail"]="install_tempmail"
)
for key in "${!custom_installs[@]}"; do
if declare -f "${custom_installs[$key]}" > /dev/null; then
"${custom_installs[$key]}"
else
echo "Not find ${custom_installs[$key]} install option $key" | gum style --foreground="#C0392B" --border-foreground="#C0392B" --border rounded --align center
fi
done
else
for choice in "${choices[@]}"; do
case "$choice" in
"YAY (Yet Another Yogurt - An AUR Helper)") install_yay ;;
"HUNT (A simplified Find command made with Rust)") install_hunt ;;
"DOOIT (A todo manager)") install_dooit ;;
"PLOW (An HTTP(S) benchmarking tool)") install_plow ;;
"CATP (Print the output of a running process)") install_catp ;;
"CURL-IMPERSONATE (A special build of curl)") install_curl_impersonate ;;
"NTFY (Send push notifications to your phone or desktop)") install_ntfy ;;
"JQP (A TUI playground for exploring jq)") install_jqp ;;
"K9S (Kubernetes CLI)") install_k9s ;;
"NNN (A full-featured terminal file manager)") install_nnn ;;
"NCDU (A disk utility for Unix systems)") install_ncdu ;;
"SSH-TOOLS (Making SSH more convenient)") install_ssh_tools ;;
"NALA (A front-end for libapt-pkg)") echo "Nala is only for APT (Debian/Ubuntu systems)." ;;
"NEOFETCH (A command-line system information tool)") install_neofetch ;;
"OTS (Share end-to-end encrypted secrets)") install_ots ;;
"BOTTOM (A graphical process/system monitor)") install_bottom ;;
"VIDDY (A modern watch command)") install_viddy ;;
"HTMLQ (Like jq, but for HTML)") install_htmlq ;;
"SYSZ (A terminal UI for systemctl)") install_sysz ;;
"PUEUE (A command-line task management tool)") install_pueue ;;
"VIZEX (Visualize disk space usage)") install_vizex ;;
"GPING (Ping, but with a graph)") install_gping ;;
"TEMPMAIL (A temporary email right from your terminal)") install_tempmail ;;
"BAT (A cat clone with syntax highlighting)") install_bat ;;
"NAVI (An interactive cheatsheet tool)") install_navi ;;
"MILLER (Miller is like awk, sed, cut, join, and sort for data formats)") install_miller ;;
*) echo "Invalid choice: $choice" | gum style --foreground="#C0392B" --border-foreground="#C0392B" --border rounded --align center ;;
esac
done
fi
gum style --foreground="#239B56" --border-foreground="#239B56" --border double --align center --padding "1 2" "Install complet."
if [ "$(getent passwd $USER | cut -d: -f7)" != "/bin/zsh" ]; then
chsh -s /bin/zsh
fi
exec zsh -l