mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-18 05:40:07 +00:00
Display available ram on BSD systems
This commit is contained in:
parent
8a66691017
commit
8be5fb62e4
1 changed files with 1 additions and 2 deletions
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue