LGiki / gnome-shell-extension-simple-system-monitor

🖥️ Show current CPU usage, memory usage and net speed on panel
https://extensions.gnome.org/extension/4506/simple-system-monitor/
GNU General Public License v2.0
48 stars 14 forks source link

Feature request: add a section for swap memory usage too #12

Closed givascu closed 1 year ago

givascu commented 1 year ago

It would be nice to have a separate section for Swap Memory, similarly to the "Memory Usage" section (which I'm guessing is just for RAM). This is a common feature of other system monitor extensions as well. The Swap Memory section can be an opt-in feature, i.e. disabled by default.

LGiki commented 1 year ago

Thanks, it looks great. I will implement this feature when I have time. Soon or later.

givascu commented 1 year ago

The implementation should be fairly straightforward and similar to the current one for RAM (I had a quick glance over the source code in the repo), as the swap memory info is also available in /proc/meminfo, e.g.

$ cat /proc/meminfo | grep Swap
SwapCached:            0 kB
SwapTotal:      16777212 kB
SwapFree:       16777212 kB

Thank you!

LGiki commented 1 year ago

Yes, the swap memory info is also included in /proc/meminfo. Only a few changes to the code are required. I will implement this feature as soon as possible.

LGiki commented 1 year ago

Sorry, I've been busy preparing for my master's thesis and interviews recently, so I haven't had time to implement this feature. But now that I'm done, I've just implemented it and released a new version. If you installed this extension from extensions.gnome.org, it will automatically update and take effect the next time you restart. If you installed it manually, please download and install from the release page. Enjoy it.

givascu commented 1 year ago

Thanks, it works! Best of luck!