From ed0b0a9746fee66f24b3ccb35674603fcd7c1166 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Tue, 27 Nov 2018 19:30:04 +0700 Subject: [PATCH] Misc: Fix 100 character limit --- neofetch | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index eab32694..38477f0a 100755 --- a/neofetch +++ b/neofetch @@ -2270,8 +2270,10 @@ get_memory() { "Solaris") hw_pagesize="$(pagesize)" - mem_total="$(($(kstat -p unix:0:system_pages:pagestotal | awk '{print $2}') * hw_pagesize / 1024 / 1024))" - mem_free="$(($(kstat -p unix:0:system_pages:pagesfree | awk '{print $2}') * hw_pagesize / 1024 / 1024))" + pages_total=$(kstat -p unix:0:system_pages:pagestotal | awk '{print $2}') + pages_free=$(kstat -p unix:0:system_pages:pagesfree | awk '{print $2}') + mem_total="$((pages_total * hw_pagesize / 1024 / 1024))" + mem_free="$((pages_free * hw_pagesize / 1024 / 1024))" mem_used="$((mem_total - mem_free))" ;; @@ -2359,7 +2361,7 @@ get_song() { printf -v players "|%s" "${players[@]}" player="$(ps aux | awk -v pattern="(${players:1})" \ - '!/ awk / && !/iTunesHelper/ && match($0,pattern){print substr($0,RSTART,RLENGTH); exit}')" + '!/ awk / && !/iTunesHelper/ && match($0,pattern){print substr($0,RSTART,RLENGTH); exit}')" [[ "$music_player" && "$music_player" != "auto" ]] && \ player="$music_player"