[FEATURE] add options to screenshot IPC for more uses
Submission checklist
- [x] I have searched existing issues and confirmed this has not been requested before.
- [x] I have checked existing pull requests for similar changes.
Feature type
New functionality
Feature summary
Allow piping screenshots to other commands and expose the existing capabilities for the screenshot command for use in scripts
Motivation / use case
The screenshot IPC is currently lacking essential flags to change behaviour for to use it for more than just screenshoting
With the proper options it could replace grim -g "$(slurp)" - for giving regions for OCR and screen recording
Proposed solution
add flags such as --no-freeze --no-copy --no-annotate --no-save --no-confirm --no-pipe to override behaviour set in noctalia settings.
Alternatives considered
use grim slurp
References / related projects
DMS exposes a wide variety of options to make screenshot a versatile tool https://danklinux.com/docs/dankmaterialshell/cli-screenshot
Additional context
No response
I have a concrete Screen Toolkit use case that seems to support this proposal.
Screen Toolkit (v1.5.3) currently calls Noctalia’s screenshot IPC, then finds the saved file and passes it into the annotation flow.
On my setup, this initially failed because Noctalia saved screenshots to:
~/Pictures
while Screen Toolkit looked in:
~/Pictures/Screenshots
So the screenshot was saved successfully, but Screen Toolkit could not find it and reported:
Screenshot wasn't saved to a file
I can work around that by changing Noctalia’s screenshot output directory to ~/Pictures/Screenshots.
However, the current flow still saves the raw screenshot first, and I do not need that file for annotation.
I locally patched Screen Toolkit to capture into /tmp and then call annotate on the temporary file. This works, but the patch gets overwritten after plugin updates.
So currently I either need to reapply the patch after updates or periodically clean up unwanted screenshots.
My local patch for screenshot toolkit attached
implemented in dcfe2b0
https://docs.noctalia.dev/noctalia/ipc/media-and-ui/?section=per-call-options#per-call-options