Repository navigation
Conversation
Region tools (ocr/qr/palette/lens/measure/annotate) polled the shell's screenshot dir for ~5s, but with [shell.screenshot] confirm_region the file only lands after the user confirms the dialog, so pipelines gave up (exit 11) leaving a plain screenshot behind. On niri (NIRI_SOCKET set, slurp+grim present) region-file now selects directly with slurp+grim into /tmp: no dialog dependency, no pickup race, no stray -region files. Other compositors keep the shell-stack path. The fallback screenshot dir was ~/Pictures/Screenshots while the v5 shell default is ~/Pictures (screenshot_*.png), so fullscreen/window pickup never found the fresh capture; fix the default. Annotate while a session is already open now exits 14 at the first 'a screenshot overlay is already active' instead of retrying thrice and showing the generic failure; the service maps it to a clear notice. New shareLast command shares the newest shell screenshot (<=5 min) or falls back to an interactive region capture, mirroring typical standalone share scripts; backed by a newest-shot [maxage] script action. Version 1.5.5, README updated.
Contributor
|
This pull request was converted to a draft because its description is missing required Missing:
Add the items above to the description, keeping their exact wording, then mark the pull Sections that only offer context may be deleted; nothing else about this pull request was |
Contributor
|
CC @Ahmed5Emad: this pull request was automatically moved to draft until you have had a chance to look at it. It will be marked ready for review automatically once you reply here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Three flows broken on Noctalia 5.3.0 + niri:
ocr/qr/palette/lens/measure/annotate) —region-filepolls the shell's screenshot dir for ~5 s, but with[shell.screenshot] confirm_regionenabled the file only lands after the user confirms the dialog, so the pipeline gives up (exit 11) and leaves a plain screenshot behind ("the tool just takes a screenshot").annotate-fullscreen/annotate-window— the fallback screenshot dir was~/Pictures/Screenshots, while the v5 shell default is~/Pictures(screenshot_*.png), so pickup never found the fresh capture.noctalia msg annotatewas retried three times against thea screenshot overlay is already activeerror and surfaced the generic capture-failed toast.Changes
region-file: on niri (NIRI_SOCKETset +slurp+grimavailable) select the region directly withslurp+griminto/tmp— no confirm-dialog dependency, no pickup race, no stray-regionfiles among the user's screenshots. Other compositors keep the shell-stack path unchanged. Both binaries were already plugin dependencies (region recording usesslurp).shell_dirfallback:~/Pictures(the actual v5 default) instead of~/Pictures/Screenshots. An explicit[shell.screenshot] directorystill wins, as before.edit: exit14on the first "already active" error instead of retrying; the service maps it to a clear already-running notice (reuses the existingpanel.runningstring — no new translations).shareLastIPC command: share the newest shell screenshot when it is ≤5 min old, otherwise capture a region interactively and share that — what standalone share scripts typically do; useful as a single keybind. Backed by a newnewest-shot [maxage-min]shell-capture action. Registered inCAPTURE_STARTSso it discards a pending unsaved recording like other capture tools.Testing
Noctalia 5.3.0 on niri (plugin API 13 floor unchanged — no new host APIs):
annotateFullscreen/annotateWindowvia IPC → editor opens, capture picked up.recordFullscreenMp4→recordStop→recordSave) with wl-screenrec 0.3.2 → valid MP4 in the video dir.shareLastend-to-end → X02 upload, URL in clipboard (uguu fallback path also exercised by the script's own tests).region-filefast path exercised with a stubbedslurpgeometry (300×200 → correct PNG); the live path reuses the sameslurp -f '%x,%y %wx%h'invocation the region recorder already ships.