Skip to content

New applet: GraphicalSystemMonitor@batzkass, a graphical system monitor#8566

Open
batzkass wants to merge 6 commits into
linuxmint:masterfrom
batzkass:master
Open

New applet: GraphicalSystemMonitor@batzkass, a graphical system monitor#8566
batzkass wants to merge 6 commits into
linuxmint:masterfrom
batzkass:master

Conversation

@batzkass
Copy link
Copy Markdown

Hi,

This is the first applet I'm writing, it is based on sysmonitor@orcus. I rewrote most of the code and added some cool features including:

  • display resource data on the graph
  • show a large resource graph on applet hover
    Regarding the major changes (including code changes), I decided to rename the project to be more explicit and to provide a new set of readme/icon/snapshot.

Note that Orcus no longer seem to update it's applet (no answers in open issues, last cinnamon 3.2).

Thanks for reviewing.

@github-actions
Copy link
Copy Markdown
Contributor

Best-practices scanner

This is a regex-based check for API usage that can pose security, performance or
maintainability issues, or that may already be provided by Cinnamon. Having code flagged
by it doesn't automatically disqualify a pull request.

This check is not perfect will not replace a normal review.


Found 6 potential issue(s):

⚠️ lang_bind

GraphicalSystemMonitor@batzkass/files/GraphicalSystemMonitor@batzkass/6.6/applet.js:239

this.update_timeout_id = Mainloop.timeout_add(Math.max(100, this.cfg_refresh_rate), Lang.bind(this, this.update));

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

GraphicalSystemMonitor@batzkass/files/GraphicalSystemMonitor@batzkass/6.6/graph.js:47

this.area.connect("repaint", Lang.bind(this, this.paint));

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

GraphicalSystemMonitor@batzkass/files/GraphicalSystemMonitor@batzkass/6.6/graph.js:48

this._tooltip.area.connect("repaint", Lang.bind(this, this.paint_tooltip));

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

ℹ️ shell_string_spawn

GraphicalSystemMonitor@batzkass/files/GraphicalSystemMonitor@batzkass/6.6/applet.js:247

GLib.spawn_command_line_async(this.cfg_onclick_program);

Prefer argument vector spawn functions over shell command strings.
This is especially important when arguments include untrusted input (user data,
filenames, settings values, etc.) as shell strings are vulnerable to injection.
Static command strings are generally fine, but argv is always safer.
Use Util.spawn(["cmd", "arg1", "arg2"]) or Util.trySpawn() instead.

⚠️ hardcoded_data_dir

GraphicalSystemMonitor@batzkass/files/GraphicalSystemMonitor@batzkass/6.6/init.js:19

Gettext.bindtextdomain(UUID, GLib.get_home_dir() + "/.local/share/locale")

Avoid hardcoding .local/share in paths. Use GLib.get_user_data_dir() instead,
which respects the XDG_DATA_HOME environment variable.

⚠️ sync_file_enumerate_children

GraphicalSystemMonitor@batzkass/files/GraphicalSystemMonitor@batzkass/6.6/providers.js:140

var en = d.enumerate_children("standard::name", Gio.FileQueryInfoFlags.NONE, null);

Synchronous enumerate_children() blocks the main loop.
Use enumerate_children_async() instead.


Automated pattern check.

@fredcw
Copy link
Copy Markdown
Contributor

fredcw commented Apr 23, 2026

This is a great improvement over sysmonitor@orcus. I did find one minor issue: If I add the applet to the bottom panel and the move the bottom panel to the top, the tooltips stop showing:

(cinnamon:1149): Cjs-CRITICAL **: 09:51:59.230: JS ERROR: TypeError: panel is null
show@/usr/share/cinnamon/js/ui/tooltips.js:359:75
show@/home/fred/.local/share/cinnamon/applets/GraphicalSystemMonitor@batzkass/6.6/graph.js:544:15
_onShowTimerComplete@/usr/share/cinnamon/js/ui/tooltips.js:133:18

One thing I'm wondering about though, is that since this does everything sysmonitor does but with extra stuff, maybe this should be an improvement to sysmonitor rather than a new applet (the "6.6" folder could simply be added to the existing applet) if @OrcusCZ is happy with that.

Also, I haven't tested it yet, but I suspect this may be compatible with earlier versions of cinnamon, not just 6.6.

Edit: Works on Mint 21.2 (cinnamon 5.8) but not earlier due to use of Array.prototype.at() so the directory can be 5.8 instead of 6.6. I also tried mint 19.3 but it didn't like cr.textExtents() (St.DrawingArea.get_context().textExtents())

@claudiux claudiux marked this pull request as draft April 23, 2026 10:12
@batzkass
Copy link
Copy Markdown
Author

Thanks for your review, and especially for your tests on older versions !
I will fix the bug you found soon, I'm pretty new to cinnamon and even didn't realized that panels can be moved :-D

I noticed that @OrcusCZ was not answering on recent issues related to sysmonitor, and I didn't found any way to contact him directly. I didn't searched hard though, focusing on the development instead ;-)
Maybe will he have a look here as we mentioned him...

@batzkass
Copy link
Copy Markdown
Author

I did find one minor issue: If I add the applet to the bottom panel and the move the bottom panel to the top, the tooltips stop showing

Note about @OrcusCZ : I noticed he didn't pushed on github since 2023. He may not see this discussion.

@batzkass
Copy link
Copy Markdown
Author

batzkass commented Apr 27, 2026

Edit: Works on Mint 21.2 (cinnamon 5.8) but not earlier

@batzkass batzkass marked this pull request as ready for review April 27, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants