@@ -48,8 +48,11 @@ function banner() {
48
48
function reposize() {
49
49
50
50
if [ " $# " -eq 2 ]; then
51
+
51
52
echo " $( echo " scale=2
53
+
52
54
$( curl https://api.github.com/repos/$1 /$2 2> /dev/null | grep size | head -1 | tr -dc ' [:digit:]' ) / 1024" | bc) MB"
55
+
53
56
fi
54
57
55
58
}
@@ -76,7 +79,6 @@ vardotfiles=(
76
79
" .color-toys"
77
80
" .zshrc"
78
81
" .tmux.conf"
79
- " .tmux-themepack"
80
82
" .termux"
81
83
82
84
)
@@ -118,7 +120,7 @@ function dotfiles() {
118
120
sleep 2
119
121
cp $DIR /$dotfile $HOME /$dotfile
120
122
121
- check () {
123
+ function check() {
122
124
123
125
if [[ -f $HOME /$dotfile ]]; then
124
126
@@ -147,7 +149,7 @@ function dotfiles() {
147
149
sleep 2
148
150
cp -R $DIR /$dotfile $HOME /$dotfile
149
151
150
- check () {
152
+ function check() {
151
153
152
154
if [[ -d $HOME /$dotfile ]]; then
153
155
@@ -191,6 +193,35 @@ function dotfiles() {
191
193
192
194
}
193
195
196
+ function tmuxtheme() {
197
+
198
+ echo -e " \n⚙️ Installing tmux-theme\n"
199
+
200
+ start_spinner " 📦 tmux-themepack"
201
+ git clone https://github.com/jimeh/tmux-themepack.git ~ /.tmux-themepack/ & > /dev/null
202
+
203
+ function check() {
204
+
205
+ if [[ -d ~ /.tmux-themepack ]]; then
206
+
207
+ stop_spinner $?
208
+
209
+ else
210
+
211
+ cp " empty" > /dev/null 2>&1
212
+ stop_spinner $?
213
+ start_spinner " 📦 tmux-themepack"
214
+ git clone https://github.com/jimeh/tmux-themepack.git ~ /.tmux-themepack/ & > /dev/null
215
+ check
216
+
217
+ fi
218
+
219
+ }
220
+
221
+ check
222
+
223
+ }
224
+
194
225
# Lightweight Installation
195
226
lightweightpkgs=(
196
227
@@ -228,7 +259,7 @@ function lightweightpackage() {
228
259
start_spinner " 📦 $lightweightpkg "
229
260
pkg install -y $lightweightpkg & > /dev/null
230
261
231
- check () {
262
+ function check() {
232
263
233
264
ipkg=$( pkg list-installed $lightweightpkg 2> /dev/null | tail -n 1)
234
265
cpkg=${ipkg%/* }
@@ -294,7 +325,7 @@ function fullpackage() {
294
325
start_spinner " 📦 $fullpkg "
295
326
pkg install -y $fullpkg & > /dev/null
296
327
297
- check () {
328
+ function check() {
298
329
299
330
ipkg=$( pkg list-installed $fullpkg 2> /dev/null | tail -n 1)
300
331
cpkg=${ipkg%/* }
@@ -331,7 +362,7 @@ function zshrepo() {
331
362
start_spinner " 📦 oh-my-zsh"
332
363
git clone git://github.com/robbyrussell/oh-my-zsh.git $HOME /.oh-my-zsh/ & > /dev/null
333
364
334
- check () {
365
+ function check() {
335
366
336
367
if [[ -d $HOME /.oh-my-zsh ]]; then
337
368
@@ -362,7 +393,7 @@ function zshrepo() {
362
393
start_spinner " 📦 zsh-syntax-highlighting"
363
394
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git $HOME /.oh-my-zsh/custom/plugins/zsh-syntax-highlighting & > /dev/null
364
395
365
- check () {
396
+ function check() {
366
397
367
398
if [[ -d $HOME /.oh-my-zsh/custom/plugins/zsh-syntax-highlighting ]]; then
368
399
@@ -391,7 +422,7 @@ function zshrepo() {
391
422
start_spinner " 📦 zsh-autosuggestions"
392
423
git clone git://github.com/zsh-users/zsh-autosuggestions.git $HOME /.oh-my-zsh/custom/plugins/zsh-autosuggestions & > /dev/null
393
424
394
- check () {
425
+ function check() {
395
426
396
427
if [[ -d $HOME /.oh-my-zsh/custom/plugins/zsh-autosuggestions ]]; then
397
428
@@ -421,12 +452,12 @@ function shell() {
421
452
422
453
echo -e " \n⚙️ Setting SHELL default"
423
454
424
- zsh () {
455
+ function zsh() {
425
456
426
457
start_spinner " 📦 change shell to zsh"
427
458
sleep 2
428
459
429
- check () {
460
+ function check() {
430
461
431
462
if [[ $( which zsh) == " /data/data/com.termux/files/usr/bin/zsh" ]]; then
432
463
@@ -469,7 +500,7 @@ function owl4cezsh() {
469
500
sleep 2
470
501
cp $DIR /.oh-my-zsh/custom/themes/$owl4cetheme $HOME /.oh-my-zsh/custom/themes/$owl4cetheme
471
502
472
- check () {
503
+ function check() {
473
504
474
505
if [[ -f $HOME /.oh-my-zsh/custom/themes/$owl4cetheme ]]; then
475
506
@@ -499,8 +530,10 @@ function neovimplug() {
499
530
sleep 2
500
531
501
532
(
533
+
502
534
set -e
503
535
nvim --headless +PlugInstall +qall > /dev/null 2>&1
536
+
504
537
)
505
538
506
539
if [ $? -eq 0 ]; then
0 commit comments