summaryrefslogtreecommitdiffstats
path: root/.local/bin/status/sb-memory
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/status/sb-memory')
-rwxr-xr-x.local/bin/status/sb-memory6
1 files changed, 5 insertions, 1 deletions
diff --git a/.local/bin/status/sb-memory b/.local/bin/status/sb-memory
index 2ab06bd..ecd0e3c 100755
--- a/.local/bin/status/sb-memory
+++ b/.local/bin/status/sb-memory
@@ -1,3 +1,7 @@
#!/bin/sh
-freecolor -o | sed -n '2p' | awk '{printf ("﬙ %2.2fG/%2.2fG\n", ($3 / (1024 ^ 2)), ($2 / (1024 ^ 2)))}'
+sysctl -n hw.physmem \
+ hw.pagesize \
+ vm.stats.vm.v_inactive_count \
+ vm.stats.vm.v_free_count \
+ vm.stats.vm.v_cache_count | xargs | awk '{printf ("﬙ %2.2fG/%2.2fG\n", ($1 / (1024 ^ 3)) - (($3 + $4 + $5) * $2 / (1024 ^ 3)), ($1 / (1024 ^ 3)))}'