diff options
author | Raphaël Cohen <raphael.cohen.utt@gmail.com> | 2017-03-12 18:03:32 +0300 |
---|---|---|
committer | Raphaël Cohen <raphael.cohen.utt@gmail.com> | 2017-03-12 18:03:32 +0300 |
commit | 8be5fb62e44b22faf75ac890e6f1b37e94997cb2 (patch) | |
tree | 1c247d5c658896180c459d11c8f9fed588e12965 | |
parent | 8a66691017ecb4b8fcb02dbecdcc693ea5585b51 (diff) |
Display available ram on BSD systems
-rwxr-xr-x | powerlevel9k.zsh-theme | 3 |
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' |