Skip to content

Commit b628bd4

Browse files
committed
myTermux-v.0.4.3 pre
1 parent 8965d0d commit b628bd4

File tree

3 files changed

+49
-12
lines changed

3 files changed

+49
-12
lines changed

.tmux-themepack

Lines changed: 0 additions & 1 deletion
This file was deleted.

.xshin.var

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,11 @@ function banner() {
4848
function reposize() {
4949

5050
if [ "$#" -eq 2 ]; then
51+
5152
echo "$(echo "scale=2
53+
5254
$(curl https://api.github.com/repos/$1/$2 2>/dev/null | grep size | head -1 | tr -dc '[:digit:]') / 1024" | bc) MB"
55+
5356
fi
5457

5558
}
@@ -76,7 +79,6 @@ vardotfiles=(
7679
".color-toys"
7780
".zshrc"
7881
".tmux.conf"
79-
".tmux-themepack"
8082
".termux"
8183

8284
)
@@ -118,7 +120,7 @@ function dotfiles() {
118120
sleep 2
119121
cp $DIR/$dotfile $HOME/$dotfile
120122

121-
check() {
123+
function check() {
122124

123125
if [[ -f $HOME/$dotfile ]]; then
124126

@@ -147,7 +149,7 @@ function dotfiles() {
147149
sleep 2
148150
cp -R $DIR/$dotfile $HOME/$dotfile
149151

150-
check() {
152+
function check() {
151153

152154
if [[ -d $HOME/$dotfile ]]; then
153155

@@ -191,6 +193,35 @@ function dotfiles() {
191193

192194
}
193195

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+
194225
# Lightweight Installation
195226
lightweightpkgs=(
196227

@@ -228,7 +259,7 @@ function lightweightpackage() {
228259
start_spinner "‏‏‎‏‏‎ ‎‏‏‎ ‎📦 $lightweightpkg"
229260
pkg install -y $lightweightpkg &>/dev/null
230261

231-
check() {
262+
function check() {
232263

233264
ipkg=$(pkg list-installed $lightweightpkg 2> /dev/null | tail -n 1)
234265
cpkg=${ipkg%/*}
@@ -294,7 +325,7 @@ function fullpackage() {
294325
start_spinner "‏‏‎‏‏‎ ‎‏‏‎ ‎📦 $fullpkg"
295326
pkg install -y $fullpkg &>/dev/null
296327

297-
check() {
328+
function check() {
298329

299330
ipkg=$(pkg list-installed $fullpkg 2> /dev/null | tail -n 1)
300331
cpkg=${ipkg%/*}
@@ -331,7 +362,7 @@ function zshrepo() {
331362
start_spinner "‏‏‎‏‏‎ ‎‏‏‎ ‎📦 oh-my-zsh"
332363
git clone git://github.com/robbyrussell/oh-my-zsh.git $HOME/.oh-my-zsh/ &>/dev/null
333364

334-
check() {
365+
function check() {
335366

336367
if [[ -d $HOME/.oh-my-zsh ]]; then
337368

@@ -362,7 +393,7 @@ function zshrepo() {
362393
start_spinner "‏‏‎‏‏‎ ‎‏‏‎ ‎📦 zsh-syntax-highlighting"
363394
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting &>/dev/null
364395

365-
check() {
396+
function check() {
366397

367398
if [[ -d $HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting ]]; then
368399

@@ -391,7 +422,7 @@ function zshrepo() {
391422
start_spinner "‏‏‎‏‏‎ ‎‏‏‎ ‎📦 zsh-autosuggestions"
392423
git clone git://github.com/zsh-users/zsh-autosuggestions.git $HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions &>/dev/null
393424

394-
check() {
425+
function check() {
395426

396427
if [[ -d $HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions ]]; then
397428

@@ -421,12 +452,12 @@ function shell() {
421452

422453
echo -e "\n⚙️ Setting SHELL default"
423454

424-
zsh() {
455+
function zsh() {
425456

426457
start_spinner "‏‏‎‏‏‎ ‎‏‏‎ ‎📦 change shell to zsh"
427458
sleep 2
428459

429-
check() {
460+
function check() {
430461

431462
if [[ $(which zsh) == "/data/data/com.termux/files/usr/bin/zsh" ]]; then
432463

@@ -469,7 +500,7 @@ function owl4cezsh() {
469500
sleep 2
470501
cp $DIR/.oh-my-zsh/custom/themes/$owl4cetheme $HOME/.oh-my-zsh/custom/themes/$owl4cetheme
471502

472-
check() {
503+
function check() {
473504

474505
if [[ -f $HOME/.oh-my-zsh/custom/themes/$owl4cetheme ]]; then
475506

@@ -499,8 +530,10 @@ function neovimplug() {
499530
sleep 2
500531

501532
(
533+
502534
set -e
503535
nvim --headless +PlugInstall +qall > /dev/null 2>&1
536+
504537
)
505538

506539
if [ $? -eq 0 ]; then

install.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@ if [[ -f $HOME/.xshin.var ]]; then
2424
dotfiles
2525

2626
if [[ -d $HOME/.config/nvim ]]; then
27+
2728
rm -rf $HOME/.config/nvim
29+
2830
fi
2931

32+
tmuxtheme
33+
3034
welcome
3135
permission
3236

@@ -41,6 +45,7 @@ if [[ -f $HOME/.xshin.var ]]; then
4145
shell
4246
owl4cezsh
4347
dotfiles
48+
tmuxtheme
4449
neovimplug
4550
welcome
4651
permission

0 commit comments

Comments
 (0)