Skip to content

Commit aad8c06

Browse files
committed
Change structure code installation with Human Readable xD
1 parent fbddf62 commit aad8c06

File tree

2 files changed

+28
-21
lines changed

2 files changed

+28
-21
lines changed

helper/screen.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
3+
function screenSize() {
4+
5+
COLS=$(echo $COLUMNS)
6+
ROWS=$(echo $LINES)
7+
8+
if [[ -n ${COLS} && -n ${ROWS} ]]; then
9+
10+
if (( ${COLS} >= 101 & ${ROWS} >= 39 )); then
11+
12+
${1}
13+
14+
else
15+
16+
echo -e "[ ${COLOR_WARNING}ERROR${COLOR_BASED} ] > Please ${COLOR_WARNING}zoom out${COLOR_BASED} your Terminal Screen!"
17+
18+
fi
19+
20+
else
21+
22+
echo -e "[ ${COLOR_WARNING}ERROR${COLOR_BASED} ] > Please run '${COLOR_WARNING}export COLUMNS LINES${COLOR_BASED}' first and then run again!"
23+
24+
fi
25+
26+
}

install.sh

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
HELPERS=(
44
colors animation banner package switchcase
55
dotfiles clone themes nvchad utility
6-
stat signal cursor finish
6+
stat signal screen cursor finish
77
)
88

99
for HELPER in ${HELPERS[@]}; do
@@ -37,23 +37,4 @@ function main() {
3737

3838
}
3939

40-
COLS=$(echo $COLUMNS)
41-
ROWS=$(echo $LINES)
42-
43-
if [[ -n ${COLS} && -n ${ROWS} ]]; then
44-
45-
if (( ${COLS} >= 101 & ${ROWS} >= 39 )); then
46-
47-
main
48-
49-
else
50-
51-
stat "ERROR" "Warning" "Please zoom out your Terminal Screen!"
52-
53-
fi
54-
55-
else
56-
57-
stat "ERROR" "Danger" "Please run 'export COLUMNS LINES' first and then run again!"
58-
59-
fi
40+
screenSize main

0 commit comments

Comments
 (0)