master
yutent 2024-01-07 13:34:51 +08:00
parent 0b62ca178d
commit 2cb4741222
1 changed files with 44 additions and 35 deletions

View File

@ -86,6 +86,10 @@ draw() {
printf "$out"
}
free() {
printf "0"
}
# 清屏
clear
@ -109,53 +113,58 @@ get_shell
ram=$(free | awk '/Mem:/ {print int($3/$2 * 100.0)}')
# vertical padding
printf "%b" "$PADR"
printf "\n"
PADXX=$((PADX - 3))
for ((i = 0; i < PADXX; ++i)); do
PADCC="$PADCC "
done
# Ascii art arms
block_1=" ▓▓ "
block_2=" ▒▒ "
block_3=" ░░ "
logo_1="${_cre}${block_1}${block_1}${block_1}${block_1}${block_1}${block_1}${_cnc}"
logo_2="${_cbl}${block_1}${_cma}${block_1}${block_1}${block_1}${block_1}${_cgr}${block_1}${_cnc}"
logo_3="${_cbl}${block_1}${_cre}${block_1}${_cbk}${block_3}${block_3}${_ccy}${block_1}${_cgr}${block_1}${_cnc}"
logo_4="${_cbl}${block_1}${_cre}${block_1}${_cbk}${block_3}${block_3}${_ccy}${block_1}${_cgr}${block_1}${_cnc}"
logo_5="${_cbl}${block_1}${_cwh}${block_1}${block_1}${block_1}${_ccy}${block_1}${_cgr}${block_1}${_cnc}"
logo_6="${_cye}${block_1}${block_1}${block_1}${block_1}${block_1}${_cgr}${block_1}${_cnc}"
deb_1=" _ _ _ "
deb_2=" __| | ___| |__ (_) __ _ _ ___"
deb_3=" / _\` |/ _ \ '_ \| |/ _\` | '_ \ "
deb_4=" | (_| | __/ |_) | | (_| | | | |"
deb_5=" \__,_|\___|_.__/|_|\__,_|_| |_|"
cat <<EOF
${_cwh} _,met\$\$\$\$\$gg.
,g\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$P.
,g\$\$P" """Y\$\$.".
,\$\$P' \`\$\$\$.
',\$\$P ,ggs. \`\$\$b:
\`d\$\$' ,\$P"' ${_cre}.${_cwh} \$\$\$
\$\$P d\$' ${_cre},${_cwh} \$\$P
\$\$: \$\$. ${_cre}-${_cwh} ,d\$\$'
\$\$; Y\$b._ _,d\$P'
Y\$\$. ${_cre}\`.${_cwh}\`"Y\$\$\$\$P"'
${_cwh} \`\$\$b ${_cre}"-.__
${_cwh} \`Y\$\$
\`Y\$\$.
\`\$\$b.
\`Y\$\$b.
\`"Y\$b._
\`"""
┌──────────────────────────┬──────────────────────────────────────────────────┐
│ │ ${deb_1} │
│ ${logo_1} │ ${deb_2} │
│ │ ${deb_3} │
│ ${logo_2} │ ${deb_4} │
│ │ ${deb_5} │
│ ${logo_3} │ │
│ │ │
│ ${logo_4} ├──────────────┬───────────────────────────────────┤
│ │ | │
│ ${logo_5} │ Host | @${host} │
│ │ OS | │
│ ${logo_6} │ Uptime | ${uptm} │
│ │ | │
├──────────────────────────┼──────────────┴───────────────────────────────────┤
EOF
BAR1=" ▓▓▓▒▒▒"
BAR2=" ▓▓▓░░░"
OUTT1="$_cbk$BAR1${_cre}$BAR1${_cgr}$BAR1${_cye}$BAR1${_cbl}$BAR1${_cma}$BAR1${_ccy}$BAR1${_cwh}$BAR1${_cnc}"
OUTT2="$_cbk$BAR2${_cre}$BAR2${_cgr}$BAR2${_cye}$BAR2${_cbl}$BAR2${_cma}$BAR2${_ccy}$BAR2${_cwh}$BAR2${_cnc}"
printf "%b\n" "$OUTT1"
printf "%b\n\n" "$OUTT2"
# greetings
printf "%b" " Hi ${_cre}${_cbd}${name}@${host}${_cnc}\n"
printf "%b" " Uptime ${_ccy}${_cbd}$uptm${_cnc}\n\n"
# environment
printf "%b" "${_cre} OS ${_cwh} ⏹ ${_cnc}$distro\n"
printf "%b" "${_cre} Host ${_cwh} ⏹ ${_cnc}${model}\n"
printf "%b" "${_cbl} Kernel ${_cwh} ⏹ ${_cnc}${kernel_version}\n"
printf "%b" "${_cma} Packages ${_cwh} ⏹ ${_cnc}${packages} (apt)\n"
printf "%b" "${_cgr} Shell ${_cwh} ⏹ ${_cnc}${shell_name} ${shell_version}\n"