aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2019-09-24 21:03:06 +0300
committerDylan Araps <dylan.araps@gmail.com>2019-09-24 21:03:06 +0300
commit6a9d36bdb931b7c3e3340bda6af612523f1580d0 (patch)
tree70453f6675791ecb690434e4ccf3b8c97b7096e7
parentfe93178946e262db2e1a74750c17f729bf167128 (diff)
downloadpfetch-6a9d36bdb931b7c3e3340bda6af612523f1580d0.tar.gz
memory: more stubs
-rwxr-xr-xpfetch12
1 files changed, 12 insertions, 0 deletions
diff --git a/pfetch b/pfetch
index 335fb76..00ae7f6 100755
--- a/pfetch
+++ b/pfetch
@@ -297,6 +297,18 @@ get_memory() {
mem_used=$((mem_full - (mem_free / 1024)))
;;
+
+ OpenBSD*)
+ # If you run OpenBSD and can send me the full output of
+ # 'vm_stat' I'll be able to add full support here.
+ mem_full=$(($(sysctl -n hw.physmem) / 1024 / 1024))
+ ;;
+
+ FreeBSD*|Dragonfly*)
+ # If you run FreeBSD or Dragonfly and can help me get
+ # the used memory amount, I'll be able to add support here.
+ mem_full=$(($(sysctl -n hw.physmem) / 1024 / 1024))
+ ;;
esac
log memory "${mem_used:-?}MiB / ${mem_full:-?}MiB"