aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorRaphaël Cohen <raphael.cohen.utt@gmail.com>2017-03-12 18:03:32 +0300
committerRaphaël Cohen <raphael.cohen.utt@gmail.com>2017-03-12 18:03:32 +0300
commit8be5fb62e44b22faf75ac890e6f1b37e94997cb2 (patch)
tree1c247d5c658896180c459d11c8f9fed588e12965 /powerlevel9k.zsh-theme
parent8a66691017ecb4b8fcb02dbecdcc693ea5585b51 (diff)
Display available ram on BSD systems
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme3
1 files changed, 1 insertions, 2 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 2af8ff14..52b56f4e 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -911,8 +911,7 @@ prompt_ram() {
ramfree=$(( ramfree * 4096 ))
else
if [[ "$OS" == "BSD" ]]; then
- ramfree=$(vmstat | grep -E '([0-9]+\w+)+' | awk '{print $5}')
- base='M'
+ ramfree=$(grep 'avail memory' /var/run/dmesg.boot | awk '{print $4}')
else
ramfree=$(grep -o -E "MemAvailable:\s+[0-9]+" /proc/meminfo | grep -o "[0-9]*")
base='K'