From b6ca417cc55ee63b72b47f8ff187c657d4408ad1 Mon Sep 17 00:00:00 2001 From: DarthMooMancer Date: Sat, 20 Sep 2025 18:52:10 -0400 Subject: [PATCH] wip --- .local/bin/myfetch.sh | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/.local/bin/myfetch.sh b/.local/bin/myfetch.sh index caed120..66357cd 100755 --- a/.local/bin/myfetch.sh +++ b/.local/bin/myfetch.sh @@ -37,16 +37,6 @@ cpu_usage() { ((dt>0)) && printf "%.1f%%" "$(bc -l <<< "100*($dt-$di)/$dt")" || echo "0.0%" } -# Time since last system update -since_update() { - days_since_update=0 - if [[ -f ~/.last_world_update ]]; then - last_epoch=$(stat -c %Y ~/.last_world_update) - days_since_update=$(( ( $(date +%s) - last_epoch ) / 86400 )) - fi - echo $days_since_update -} - cpu_use=$(cpu_usage) # Memory @@ -58,16 +48,12 @@ sys_age=$(( ( $(date +%s) - $(stat -c %W / 2>/dev/null || echo 0) ) / 86400 )) # Packages pkg_count=$(find /var/db/pkg -mindepth 2 -maxdepth 2 -type d 2>/dev/null | wc -l) -# Days since last update -days_update=$(since_update) - # --- Define lines (easy to add new ones) --- lines=( "${cyan}CPU${reset}: ${physical_cores}c/${logical_threads}t/${cpu_use}" "${green}Memory${reset}: ${mem_usage}" - "${magenta}Age${reset}: ${sys_age} days" + "${red}Age${reset}: ${sys_age} days" "${blue}Pkgs${reset}: ${pkg_count}" - "${red}Update${reset}: ${days_update}" ) # --- Compute max width --- @@ -82,14 +68,6 @@ for l in "${lines[@]}"; do hline=$(printf "%${maxlen}s" "" | sed "s/ /$h/g") printf '%s%s%s\n' "$tl" "$hline" "$tr" -# # --- Content --- -# for l in "${lines[@]}"; do -# stripped=$(strip_colors "$l") -# pad=$((maxlen - ${#stripped})) -# printf '%s%s%*s%s\n' "$v" "$l" "$pad" "" "$v" -# done - -# --- Content with right-aligned values --- for l in "${lines[@]}"; do # split into label and value at first colon label="${l%%:*}:" # label including colon