mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 16:27:36 +00:00
Ports: Update neofetch to use the right /proc/memstat values
This commit is contained in:
parent
e4e5fa74d0
commit
7b7847c707
1 changed files with 5 additions and 5 deletions
|
@ -10,7 +10,7 @@ Co-Authored-By: Nico Weber <thakis@chromium.org>
|
||||||
1 file changed, 90 insertions(+), 31 deletions(-)
|
1 file changed, 90 insertions(+), 31 deletions(-)
|
||||||
|
|
||||||
diff --git a/neofetch b/neofetch
|
diff --git a/neofetch b/neofetch
|
||||||
index 1e4b564..ea5e351 100755
|
index 1e4b564..d2a12cd 100755
|
||||||
--- a/neofetch
|
--- a/neofetch
|
||||||
+++ b/neofetch
|
+++ b/neofetch
|
||||||
@@ -794,7 +794,7 @@ image_source="auto"
|
@@ -794,7 +794,7 @@ image_source="auto"
|
||||||
|
@ -124,10 +124,10 @@ index 1e4b564..ea5e351 100755
|
||||||
|
|
||||||
+ "SerenityOS")
|
+ "SerenityOS")
|
||||||
+ memstat="$(cat /proc/memstat)"
|
+ memstat="$(cat /proc/memstat)"
|
||||||
+ user_physical_allocated="$(echo $memstat | jq .user_physical_allocated)"
|
+ physical_allocated="$(echo $memstat | jq .physical_allocated)"
|
||||||
+ user_physical_available="$(echo $memstat | jq .user_physical_available)"
|
+ physical_available="$(echo $memstat | jq .physical_available)"
|
||||||
+ mem_used="$((user_physical_allocated * 4096 / 1024 / 1024))"
|
+ mem_used="$((physical_allocated * 4096 / 1024 / 1024))"
|
||||||
+ mem_free="$((user_physical_available * 4096 / 1024 / 1024))"
|
+ mem_free="$((physical_available * 4096 / 1024 / 1024))"
|
||||||
+ mem_total="$((mem_used + mem_free))"
|
+ mem_total="$((mem_used + mem_free))"
|
||||||
+ ;;
|
+ ;;
|
||||||
+
|
+
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue