Skip to content

linux-visualizator: add new desklet - #1866

Open
KoDiK2005 wants to merge 1 commit into
linuxmint:masterfrom
KoDiK2005:add-linux-visualizator
Open

linux-visualizator: add new desklet#1866
KoDiK2005 wants to merge 1 commit into
linuxmint:masterfrom
KoDiK2005:add-linux-visualizator

Conversation

@KoDiK2005

Copy link
Copy Markdown

Summary

New desklet: real-time visualization of CPU (per-core rings/bars/graph), RAM/Swap,
network traffic, disk usage/I/O, and GPU load/memory/temperature.

  • GPU support for NVIDIA (via nvidia-smi) and AMD (via amdgpu sysfs); the section
    is omitted automatically if no supported GPU is detected.
  • Per-category accent colors, adjustable warning/critical color thresholds, an
    interface scale slider, configurable section order, and disk/network filters.
  • Click-to-launch a configurable command (defaults to gnome-system-monitor).
  • All /proc reads and subprocess calls use asynchronous GIO APIs
    (load_contents_async, communicate_utf8_async, enumerate_children_async).
  • UI strings are in English, wrapped with Gettext.dgettext for future translation.

Source repo (also has an independent Python/Qt implementation of the same idea):
https://github.com/KoDiK2005/linux-visualizator

Test plan

  • ./validate-spice linux-visualizator@KoDiK2005 passes with no errors
  • node --check desklet.js passes
  • Installed and tested live on Linux Mint 22.3 (Cinnamon) via cinnamon --replace;
    confirmed no JS errors in the log and correct rendering of all sections

Real-time visualization of CPU (per-core), RAM/Swap, network traffic,
disk usage/I/O, and GPU load/memory/temperature (NVIDIA/AMD, if detected).
Fully customizable: per-category accent colors, warning/critical color
thresholds, interface scale, section order, disk/network filters, and a
click-to-launch command.

Source: https://github.com/KoDiK2005/linux-visualizator
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

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. Most findings
are advisory and do not automatically disqualify a pull request.

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


Found 4 potential issue(s):

⚠️ WARNING

⚠️ hardcoded_data_dir

linux-visualizator@KoDiK2005/files/linux-visualizator@KoDiK2005/desklet.js:13

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.

⚠️ lang_bind

linux-visualizator@KoDiK2005/files/linux-visualizator@KoDiK2005/desklet.js:598

this._timeoutId = Mainloop.timeout_add(intervalMs, Lang.bind(this, this._tick));

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

linux-visualizator@KoDiK2005/files/linux-visualizator@KoDiK2005/desklet.js:605

this._animationTimeoutId = Mainloop.timeout_add(ANIMATION_INTERVAL_MS, Lang.bind(this, this._animateStep));

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

ℹ️ INFO

ℹ️ shell_string_spawn

linux-visualizator@KoDiK2005/files/linux-visualizator@KoDiK2005/desklet.js:512

GLib.spawn_command_line_async(command);

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.


Automated pattern check.

@claudiux

claudiux commented Jul 3, 2026

Copy link
Copy Markdown
Member

Please take into account the "Best practices" above.

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.

3 participants