# System monitor graph Desklet
Desklet to show graphs for the level of activity in various system variables including: CPU, memory, network and disks. The desklet supports multiple instances with different system variables with the idea of presenting them in a uniform way.

Four instances of the Desklet in action.
This project has been inspired from other Desklets such as [Disk Space](https://cinnamon-spices.linuxmint.com/desklets/view/39), [CPU Load](https://cinnamon-spices.linuxmint.com/desklets/view/44), [Simple system monitor](https://cinnamon-spices.linuxmint.com/desklets/view/29), [Network usage monitor](https://cinnamon-spices.linuxmint.com/desklets/view/15), [Top](https://cinnamon-spices.linuxmint.com/desklets/view/41), and the [Rainmeter Win10 Widgets](https://win10widgets.com/).
## Features
### Variables to monitor (v2.2 - July 2026)
| System variable | Description |
| ----------- | ----------- |
| CPU | CPU usage in % |
| CPU Temperature | CPU temperature in C or F |
| CPU Fan | CPU fan speed in RPM and on/off status |
| RAM | Used RAM as % of total, and in GB |
| Swap | Used Swap space as % of total, and in GB |
| HDD | % of I/O activity, and free and total space in the filesystem (partition) indicated by the user |
| GPU Usage | GPU usage in % |
| GPU Memory | GPU memory usage in % |
| GPU Temperature | GPU temperature C or F |
| Network | Real-time upload and download speeds with dual-line graph, configurable interface monitoring |
| Battery | Current capacity %, and Status |
Each variable is calculated every `Refresh interval` seconds (Min. 1 s, Max. 60 s.), and the graph shows the last `Duration of the graph` period (Min. 30 s, Max. 60 min).
GPU graphs work for NVIDIA, discrete AMD and built-in AMD.
Fan monitoring uses CPU-labelled sensors and known laptop cooling drivers. It avoids guessing from unrelated unlabelled fans, and reports when an identifiable CPU fan is not detected.
### Customizable visual elements

Settings for one instance of the system monitor graph Desklet.
### Screenshots

The Desklet is fully customizable.

A simple screenshot.

Another screenshot.

Screenshot with temperature and battery graphs.

CPU fan speed history while the fan is running and stopped.
## TODO
- [x] Add network
- [x] Battery levels for main battery (laptop)
- [x] CPU and GPU temperatures
- [ ] Battery levels for main battery (laptop)
### Resources
This is my first Desklet and the first time using JavaScript. Below, some resources that I used for the development of this Desklet.
* [cinnamon-spices-desklets](https://github.com/linuxmint/cinnamon-spices-desklets)
* [JavaScript Tutorial](https://www.w3schools.com/js/default.asp)
* [CJS: JavaScript bindings for Cinnamon](https://github.com/linuxmint/cjs)
* [CJS the importer](http://lira.epac.to:8080/doc/cinnamon/cinnamon-tutorials/importer.html)
* [Applet, desklet and extension settings reference](https://projects.linuxmint.com/reference/git/cinnamon-tutorials/xlet-settings.html) and [here](https://projects.linuxmint.com/reference/git/cinnamon-tutorials/xlet-settings-ref.html)
* [GJS: JavaScript Bindings for GNOME](https://gitlab.gnome.org/GNOME/gjs/blob/master/doc/Home.md) and [here](https://gjs-docs.gnome.org/)
* [GJS examples](https://github.com/optimisme/gjs-examples)
* [Clutter API](https://gjs-docs.gnome.org/clutter4~4_api/)
* [Computing CPU usage](https://rosettacode.org/wiki/Linux_CPU_utilization)
* [Launching sequential processes from desklet](https://stackoverflow.com/questions/61147229/multiple-arguments-in-gio-subprocess)
* On [Cinnamon.get_file_contents_utf8_sync()](https://github.com/linuxmint/cinnamon-spices-desklets/issues/428)
* Default [`desklet.js` in Cinnamon](https://github.com/linuxmint/cinnamon/blob/master/js/ui/desklet.js)
* [Manual alpha blending](https://stackoverflow.com/questions/746899/how-to-calculate-an-rgb-colour-by-specifying-an-alpha-blending-amount)
* [Cairo documentation](https://www.cairographics.org/documentation/)