tmux-plugins / tmux-cpu

Plug and play cpu percentage and icon indicator for Tmux.
MIT License
444 stars 69 forks source link

Enable ram_percentage on macos #45

Closed Filriya closed 4 years ago

Filriya commented 4 years ago

It is a very nice plugin for me. Thank you.

Unfortunately, it is not possible to display the memory usage on macOS. This is because macOS does not have a free command.

Instead, macOS has a vm_stat command. This is different from the linux vmstat command, but it can be used in such cases.

This is the code that uses the vm_stat command to display memory on macOS. It works well in my environment. I would be glad if it would be helpful.

The display result of the vm_stat command is difficult to understand for me. I looked into it as much as I could. And it looks like it's working. However, I may have made a mistake.

casperdcl commented 4 years ago

Thanks @Filriya