From 95c744f0f8a0c0482947bad18552add1dad99a4e Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 26 Mar 2016 22:46:07 +1100 Subject: [PATCH] Merge Windows and Linux uptime blocks since they're the same --- neofetch | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/neofetch b/neofetch index a95a14b8..988a32a6 100755 --- a/neofetch +++ b/neofetch @@ -554,9 +554,9 @@ getkernel() { getuptime () { case "$os" in - "Linux") + "Linux" | "Windows") case "$distro" in - "Puppy Linux"* | "Quirky Werewolf"* | "Precise Puppy"* | "Alpine Linux"*) + *"Puppy"* | "Quirky Werewolf"* | "Alpine Linux"* | "Windows"*) uptime=$(uptime | awk -F ':[0-9]{2}+ |(, ){1}+' '{printf $2}') uptime=${uptime/ / } ;; @@ -610,11 +610,6 @@ getuptime () { uptime="up $uptime" ;; - "Windows") - uptime=$(uptime | awk -F ':[0-9]{2}+ |(, ){1}+' '{printf $2}') - uptime=${uptime/ / } - ;; - *) uptime="Unknown" ;;