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"