mcc days ago

master
Daniel Napora 2022-09-20 18:04:09 +02:00
parent 8333624e8c
commit 94ba2d5f41
1 changed files with 13 additions and 1 deletions

14
bin/mcc
View File

@ -96,6 +96,7 @@ case $LANG in
KERNEL_LBL="jądro"
KERNELS="Jądra"
INSTALLED="zainstalowany:"
DAYS_AGO="dni temu"
MABOX_DESC="Twój lekki, szybki i funkcjonalny Linuksowy Desktop"
ADVANCED="Zaawansowane"
;;
@ -186,6 +187,7 @@ case $LANG in
KERNEL_LBL="kernel"
KERNELS="Kernels"
INSTALLED="install date: "
DAYS_AGO="days ago"
MABOX_DESC="Your fast, lightweight and functional Linux Desktop"
ADVANCED="Advanced"
;;
@ -276,6 +278,7 @@ case $LANG in
KERNEL_LBL="kernel"
KERNELS="Kernels"
INSTALLED="install date: "
DAYS_AGO="days ago"
MABOX_DESC="Your fast, lightweight and functional Linux Desktop"
ADVANCED="Advanced"
;;
@ -319,6 +322,15 @@ if [[ -e /var/log/pacman.log ]]; then
INST="${INST/\[/}"
#INST="${INST//\-/ }"
fi
# Days ago
TODAY=$(date +%F)
let DIFF=($(date +%s -d ${TODAY})-$(date +%s -d ${INST}))/86400
if [[ "$DIFF" > "1" ]];then
DAGO="${DIFF} ${DAYS_AGO}"
else
DAGO=""
fi
PKGS=$(pacman -Qq 2>/dev/null | wc -l)
# kernel version
KERN="${KERN:-$(uname -sr | awk '{print $2}')}"
@ -331,7 +343,7 @@ RESOLUTION=$(xdpyinfo | awk '/^ +dimensions/ {print $2}')
INTRO_TXT=$(cat <<EOF
\t<big>Mabox Linux $OSVERSION</big> <i>$OSCODE</i>
\t<small><i>$MABOX_DESC</i></small>\n
\t<small><tt>$INSTALLED </tt></small><b>$INST</b>
\t<small><tt>$INSTALLED </tt></small><b>$INST</b> <small>($DAGO)</small>
\t<small><tt>wm: </tt></small><b>$XDG_SESSION_DESKTOP</b>
\t<small><tt>uptime: </tt></small><b>$UPT</b>
\n