Skip to content

Commit

Permalink
Merge pull request #39 from mayTermux/table-line
Browse files Browse the repository at this point in the history
change char table line
  • Loading branch information
nihsx authored Apr 3, 2022
2 parents 7ceb60c + 9d7e395 commit 61f2058
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 77 deletions.
Binary file modified .config/mytermux/alert/images/finish.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .local/bin/rxfetch
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ main
echo -e "\n\n"
echo -e " ┏━━━━━━━━━━━━━━━━━━━━━━┓"
echo -e "${c1}r${c2}x${c7}f${c4}e${c5}t${c6}${c7}c${c1}h${c0} ${c5}${c0} ${c6}${c0} ${c7}${c0}${codename}${c5}@${c0}${client_base}"
echo -e " ━━━━━━━━━━━━━━━━━━━━━━┫"
echo -e " ━━━━━━━━━━━━━━━━━━━━━━┫"
echo -e " ┃ ┃ ${c1}phone${c0} ${model}"
echo -e "${c3}${c8}_${c3}${c0}${c2}os${c0} ${os}"
echo -e "${c8}${c0}${c9}oo${c0}${c8}|${c0}${c7}ker${c0} ${kernel}"
Expand Down
32 changes: 16 additions & 16 deletions helper/banner.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
#!/usr/bin/env bash

VERSION="0.6.1"
BUILD_DATE="19 November 2021"
VERSION="0.6.2"
BUILD_DATE="03 April 2022"
AUTHOR="xShin"

function banner() {

echo -e "
┌────────────────────────────────────────────────────────────────┐
_______
(_______)
____ _ _ _ _____ ____ ____ _ _ _ _
| \| | | | | ___ |/ ___) \| | | ( \ / )
| | | | |_| | | ____| | | | | | |_| |) X (
|_|_|_|\__ |_|_____)_| |_|_|_|____/(_/ \_)
(____/
🚀 Version : ${VERSION}
📅 Build Date : ${BUILD_DATE}
⚙️ Author : ${AUTHOR}
╰────────────────────────────────────────────────────────────────╯
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
_______
(_______)
____ _ _ _ _____ ____ ____ _ _ _ _
| \| | | | | ___ |/ ___) \| | | ( \ / )
| | | | |_| | | ____| | | | | | |_| |) X (
|_|_|_|\__ |_|_____)_| |_|_|_|____/(_/ \_)
(____/
🚀 Version : ${VERSION}
📅 Build Date : ${BUILD_DATE}
⚙️ Author : ${AUTHOR}
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
"
}
20 changes: 6 additions & 14 deletions helper/clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,29 +46,21 @@ function repositories() {
echo -e "‏‏‎‏‏‎ ‎ ‎‏‏‎ ‎📦 Getting Information Repository"
sleep 2s

# echo -e "
# ╭────────────────────────────────────────────────────────────────────╮
# ┃ Information Repository ┃
# ╰────────────────────────────────────────────────────────────────────╯
# ┃ Repository Name ┃ Repository Size ┃
# ╰────────────────────────────────────────────────────────────────────╯"
echo -e "
╭────────────────────────────────────────────────────────────────────╮
┃ Information Repository ┃
╰────────────────────────────────────────────────────────────────────╯
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Information Repository ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃ Repository Name Repository Size ┃
╰────────────────────────────────────────────────────────────────────╯"
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛"

for REPOSITORY_API in "${REPOSITORY_APIS[@]}"; do

REPOSITORY_NAME=$(curl https://api.github.com/${REPOSITORY_API} 2> /dev/null | grep full_name | sed -n 1p | awk '{print $2}' | sed "s/,//g" | sed "s/\"//g")
# printf " ┃ ${COLOR_SUCCESS}%-36s${COLOR_BASED} ▎ ${COLOR_WARNING}%8s${COLOR_BASED} ┃\n" $REPOSITORY_NAME `repoSize $REPOSITORY_API`
printf "${COLOR_SUCCESS}%-36s${COLOR_BASED} ${COLOR_WARNING}%8s${COLOR_BASED} ┃\n" $REPOSITORY_NAME `repoSize $REPOSITORY_API`
echo -e " ╰────────────────────────────────────────────────────────────────────╯"
printf "${COLOR_SUCCESS}%-36s${COLOR_BASED} ${COLOR_WARNING}%8s${COLOR_BASED} ┃\n" $REPOSITORY_NAME `repoSize $REPOSITORY_API`
echo -e " ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛"

done

# echo " ╰────────────────────────────────────────────────────────────────────╯"
echo -e ""

}
Expand Down
21 changes: 6 additions & 15 deletions helper/dotfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,21 @@ function dotFiles() {
echo -e "\n‏‏‎‏‏‎ ‎ ‎‏‏‎ ‎📦 Getting Information Dotfiles"
sleep 2s

# echo -e "
# ╭───────────────────────────────────────────────╮
# ┃ Information Dotfiles ┃
# ╰───────────────────────────────────────────────╯
# ┃ Folder Name ┃ Folder Size ┃
# ╰───────────────────────────────────────────────╯"

echo -e "
╭───────────────────────────────────────────────╮
echo -e "
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Information Dotfiles ┃
╰───────────────────────────────────────────────╯
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃ Folder Name Folder Size ┃
╰───────────────────────────────────────────────╯"
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛"

for DOTFILE in "${DOTFILES[@]}"; do

FOLDER_SIZE=$(du -s -h $DOTFILE | awk '{print $1}')
# printf " ┃ ${COLOR_SUCCESS}%-12s${COLOR_BASED} ▎ ${COLOR_WARNING}%5s${COLOR_BASED} ┃\n" $DOTFILE $FOLDER_SIZE
printf "${COLOR_SUCCESS}%-12s${COLOR_BASED} ${COLOR_WARNING}%5s${COLOR_BASED} ┃\n" $DOTFILE $FOLDER_SIZE
echo -e " ╰───────────────────────────────────────────────╯"
printf "${COLOR_SUCCESS}%-12s${COLOR_BASED} ${COLOR_WARNING}%5s${COLOR_BASED} ┃\n" $DOTFILE $FOLDER_SIZE
echo -e " ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛"

done

# echo " ╰───────────────────────────────────────────────╯"
echo ""

}
Expand Down
2 changes: 1 addition & 1 deletion helper/finish.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

MYTERMUX_VERSION="0.6.1"
MYTERMUX_VERSION="0.6.2"

function alertFinish() {

Expand Down
30 changes: 8 additions & 22 deletions helper/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,14 @@ function packages() {
KB_INSTALLED_SIZE=0
MB_INSTALLED_SIZE=0

# TOTAL_DOWNLOAD_SIZE=0
# TOTAL_INSTALLED_SIZE=0

echo -e "‏‏‎‏‏‎ ‎ ‎‏‏‎ ‎📦 Getting Information Packages"
# echo -e "
# ╭─────────────────────────────────────────────────────────────────────────────────────╮
# ┃ Information Packages ┃
# ╰─────────────────────────────────────────────────────────────────────────────────────╯
# ┃ Package Name ┃ Version ┃ Download ┃ Installed ┃
# ╰─────────────────────────────────────────────────────────────────────────────────────╯"

echo -e "
╭─────────────────────────────────────────────────────────────────────────────────────╮
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Information Packages ┃
╰─────────────────────────────────────────────────────────────────────────────────────╯
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃ Package Name Version Download Installed ┃
╰─────────────────────────────────────────────────────────────────────────────────────╯"
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛"

for PACKAGE in "${PACKAGES[@]}"; do

Expand All @@ -44,34 +36,28 @@ function packages() {
UNIT_DOWNLOAD_SIZE=$(apt show $PACKAGE 2> /dev/null | grep Download-Size: | awk '{print $3}')
UNIT_INSTALLED_SIZE=$(apt show $PACKAGE 2> /dev/null | grep Installed-Size: | awk '{print $3}')

printf "${COLOR_SUCCESS}%-13s${COLOR_BASED} ${COLOR_WARNING}%10s${COLOR_BASED} ${COLOR_WARNING}%-4s${COLOR_BASED} %-2s ${COLOR_WARNING}%-4s${COLOR_BASED} %-2s ┃\n" $PACKAGE_NAME $VERSION ${DOWNLOAD_SIZE} "${UNIT_DOWNLOAD_SIZE}" ${INSTALLED_SIZE} "${UNIT_INSTALLED_SIZE}"
echo -e " ╰─────────────────────────────────────────────────────────────────────────────────────╯"

# echo -e "Unit Download: ${UNIT_DOWNLOAD_SIZE} Unit Installed: ${UNIT_INSTALLED_SIZE}"
printf "${COLOR_SUCCESS}%-13s${COLOR_BASED} ${COLOR_WARNING}%10s${COLOR_BASED} ${COLOR_WARNING}%-4s${COLOR_BASED} %-2s ${COLOR_WARNING}%-4s${COLOR_BASED} %-2s ┃\n" $PACKAGE_NAME $VERSION ${DOWNLOAD_SIZE} "${UNIT_DOWNLOAD_SIZE}" ${INSTALLED_SIZE} "${UNIT_INSTALLED_SIZE}"
echo -e " ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛"

if [[ "${UNIT_DOWNLOAD_SIZE}" == "kB" && "${UNIT_INSTALLED_SIZE}" == "MB" ]]; then

KB_DOWNLOAD_SIZE=$(echo "${KB_DOWNLOAD_SIZE} + ${DOWNLOAD_SIZE} / 1024" | bc -l | xargs -i printf "%'.1f" {})
MB_INSTALLED_SIZE=$(echo "${MB_INSTALLED_SIZE} + ${INSTALLED_SIZE}" | bc -l | xargs -i printf "%'.1f" {})
# echo -e "\n[ ${COLOR_WARNING}KB Download${COLOR_BASED} ] > ${KB_DOWNLOAD_SIZE} \n[ ${COLOR_CYAN}MB Installed${COLOR_BASED} ] > ${MB_INSTALLED_SIZE}"

elif [[ "${UNIT_DOWNLOAD_SIZE}" == "MB" && "${UNIT_INSTALLED_SIZE}" == "kB" ]]; then

MB_DOWNLOAD_SIZE=$(echo "${MB_DOWNLOAD_SIZE} + ${DOWNLOAD_SIZE}" | bc -l | xargs -i printf "%'.1f" {})
KB_INSTALLED_SIZE=$(echo "${KB_INSTALLED_SIZE} + ${INSTALLED_SIZE} / 1024" | bc -l | xargs -i printf "%'.1f" {})
# echo -e "\n[ ${COLOR_WARNING}MB Download${COLOR_BASED} ] > ${MB_DOWNLOAD_SIZE} \n[ ${COLOR_CYAN}KB Installed${COLOR_BASED} ] > ${KB_INSTALLED_SIZE}"

elif [[ "${UNIT_DOWNLOAD_SIZE}" == "kB" && "${UNIT_INSTALLED_SIZE}" == "kB" ]]; then

KB_DOWNLOAD_SIZE=$(echo "${KB_DOWNLOAD_SIZE} + ${DOWNLOAD_SIZE} / 1024" | bc -l | xargs -i printf "%'.1f" {})
KB_INSTALLED_SIZE=$(echo "${KB_INSTALLED_SIZE} + ${INSTALLED_SIZE} / 1024" | bc -l | xargs -i printf "%'.1f" {})
# echo -e "\n[ ${COLOR_WARNING}KB Download${COLOR_BASED} ] > ${KB_DOWNLOAD_SIZE} \n[ ${COLOR_CYAN}KB Installed${COLOR_BASED} ] > ${KB_INSTALLED_SIZE}"

elif [[ "${UNIT_DOWNLOAD_SIZE}" == "MB" && "${UNIT_INSTALLED_SIZE}" == "MB" ]]; then

MB_DOWNLOAD_SIZE=$(echo "${MB_DOWNLOAD_SIZE} + ${DOWNLOAD_SIZE}" | bc -l | xargs -i printf "%'.1f" {})
MB_INSTALLED_SIZE=$(echo "${MB_INSTALLED_SIZE} + ${INSTALLED_SIZE}" | bc -l | xargs -i printf "%'.1f" {})
# echo -e "\n[ ${COLOR_WARNING}MB Download${COLOR_BASED} ] > ${MB_DOWNLOAD_SIZE} \n[ ${COLOR_CYAN}MB Installed${COLOR_BASED} ] > ${MB_INSTALLED_SIZE}"

fi

Expand All @@ -80,8 +66,8 @@ function packages() {
TOTAL_DOWNLOAD_SIZE=$(echo "${KB_DOWNLOAD_SIZE} + ${MB_DOWNLOAD_SIZE}" | bc -l | xargs -i printf "%'.1f" {})
TOTAL_INSTALLED_SIZE=$(echo "${KB_INSTALLED_SIZE} + ${MB_INSTALLED_SIZE}" | bc -l | xargs -i printf "%'.1f" {})

printf " ┃ [ ${COLOR_WARNING}%5s${COLOR_BASED} ] ─────────────────────────────────> ${COLOR_WARNING}%6s${COLOR_BASED} %-2s ${COLOR_WARNING}%6s${COLOR_BASED} %-2s ┃" "TOTAL" ${TOTAL_DOWNLOAD_SIZE} "MB" ${TOTAL_INSTALLED_SIZE} "MB"
echo -e "\n ╰─────────────────────────────────────────────────────────────────────────────────────╯"
printf " ┃ [ ${COLOR_WARNING}%5s${COLOR_BASED} ] ─────────────────────────────────> ${COLOR_WARNING}%6s${COLOR_BASED} %-2s ${COLOR_WARNING}%6s${COLOR_BASED} %-2s ┃" "TOTAL" ${TOTAL_DOWNLOAD_SIZE} "MB" ${TOTAL_INSTALLED_SIZE} "MB"
echo -e "\n ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛"

echo ""

Expand Down
Loading

0 comments on commit 61f2058

Please sign in to comment.