From 6b4e4d55e2c586bab332a4c04005ebf0825f35d7 Mon Sep 17 00:00:00 2001 From: Frost-Phoenix <67cyril6767@gmail.com> Date: Fri, 15 Dec 2023 19:13:07 +0100 Subject: [PATCH] clean up --- modules/home/scripts/scripts/maxfetch.sh | 29 ++++++++---------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/modules/home/scripts/scripts/maxfetch.sh b/modules/home/scripts/scripts/maxfetch.sh index c1413ef..e6ba7c8 100755 --- a/modules/home/scripts/scripts/maxfetch.sh +++ b/modules/home/scripts/scripts/maxfetch.sh @@ -15,26 +15,17 @@ _bright=$(tput bold) normal=$(tput sgr0) _underline=$(tput smul) -# up=$(uptime | sed -E 's/^[^,]*up *//; s/mins/minutes/; s/hrs?/hours/; - # s/([[:digit:]]+):0?([[:digit:]]+)/\1 hours, \2 minutes/; - # s/^1 hours/1 hour/; s/ 1 hours/ 1 hour/; - # s/min,/minutes,/; s/ 0 minutes,/ less than a minute,/; s/ 1 minutes/ 1 minute/; - # s/ / /; s/, *[[:digit:]]* users?.*//') - -up=$( - uptime | awk -F'( |,|:)+' '{ - d=h=m=0; - if ($7=="min") - m=$6; - else { - if ($7~/^day/) { d=$6; h=$8; m=$9} - else {h=$6;m=$7} - } +up=$(uptime | awk -F'( |,|:)+' '{ + d=h=m=0; + if ($7=="min") + m=$6; + else { + if ($7~/^day/) { d=$6; h=$8; m=$9} + else {h=$6;m=$7} + } } - { - print h+0,"h",m+0,"m" - }' -) + { print h+0,"h",m+0,"m" } +') pkgs=$(nix-store --query --requisites /run/current-system | wc -l)