Skip to content

Add screen snipper applet#8303

Open
kpr-dev590 wants to merge 10 commits intolinuxmint:masterfrom
kpr-dev590:add-screen-snipper-applet
Open

Add screen snipper applet#8303
kpr-dev590 wants to merge 10 commits intolinuxmint:masterfrom
kpr-dev590:add-screen-snipper-applet

Conversation

@kpr-dev590
Copy link

@kpr-dev590 kpr-dev590 commented Feb 11, 2026

This PR adds a new applet called Screen Snipper. It is a lightweight panel tool that allows users to quickly capture screenshots using the native gnome-screenshot backend.

Features:

  • Capture Area: Select a region of the screen to copy directly to the clipboard.
  • Delayed Capture: Full-screen capture with a configurable timer (0-20 seconds), useful for capturing menus/tooltips.
  • Native Integration: Uses the system theme's symbolic icon (edit-cut-symbolic) for a consistent look in both the panel and settings window.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds two new Cinnamon desktop applets, though the PR title and description only mention the Screen Snipper applet. The Screen Snipper provides screenshot functionality using gnome-screenshot, while the Resource Monitor displays system resource usage (CPU, RAM, and Swap) in the panel.

Changes:

  • Added Screen Snipper applet with area capture and delayed capture features using gnome-screenshot backend
  • Added Resource Monitor applet that displays real-time CPU, RAM, and Swap usage by reading from /proc filesystem

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
screen-snipper@kprakesh/applet.js Main ES6 class-based applet implementation for screenshot functionality
screen-snipper@kprakesh/metadata.json Metadata defining applet name, version, and Cinnamon compatibility
screen-snipper@kprakesh/settings-schema.json Settings schema for configurable delay timer
screen-snipper@kprakesh/README.md Documentation with features, dependencies, and usage instructions
screen-snipper@kprakesh/LICENSE GPL-3.0 license file
resource-monitor@kprakesh/applet.js Prototype-based applet that monitors system resources via /proc filesystem
resource-monitor@kprakesh/metadata.json Metadata for resource monitor applet
resource-monitor@kprakesh/settings-schema.json Settings schema for toggling CPU, RAM, and Swap display
resource-monitor@kprakesh/README.md Documentation for resource monitor with technical details
resource-monitor@kprakesh/LICENSE GPL-3.0 license file
resource-monitor@kprakesh/utilities-system-monitor.png PNG icon file (purpose unclear given symbolic icon usage)

@kpr-dev590
Copy link
Author

kpr-dev590 commented Feb 20, 2026

Key Changes:

  • Scope Reduced: Removed the unfinished resource-monitor applet from this PR so this submission is strictly focused on screen-snipper.
  • Folder Structure & Spices Requirements: Moved the source files into the required files/screen-snipper@kprakesh/ directory. Added the mandatory info.json, icon.png, and screenshot.png storefront files to the root.
  • Code Modernization: Renamed the generic class to ScreenSnipperApplet. Ensured all code strictly uses modern ES6 syntax (arrow functions, .bind()) instead of the legacy Lang.bind.
  • Safe Execution: Added a _checkDependency() function. If the user does not have gnome-screenshot installed, the applet will now gracefully catch this and show a native Cinnamon UI notification rather than failing silently.
  • Metadata & Licensing: Expanded the cinnamon-version array in metadata.json to be comprehensive. Added the standard GNU GPL v3 license header to the top of applet.js.
  • Documentation: Fixed the markdown code block formatting in the README.md and refined the descriptions.

@github-actions
Copy link
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 2 potential issue(s):

ℹ️ shell_string_spawn

screen-recorder@kprakesh/files/screen-recorder@kprakesh/applet.js:101

Util.spawnCommandLineAsync(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.

screen-recorder@kprakesh/files/screen-recorder@kprakesh/applet.js:116

Util.spawnCommandLineAsync("killall -SIGINT ffmpeg");

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.

@github-actions
Copy link
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 2 potential issue(s):

ℹ️ shell_string_spawn

screen-recorder@kprakesh/files/screen-recorder@kprakesh/applet.js:101

Util.spawnCommandLineAsync(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.

screen-recorder@kprakesh/files/screen-recorder@kprakesh/applet.js:116

Util.spawnCommandLineAsync("killall -SIGINT ffmpeg");

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.

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