feat(screencast-gif): add hotkey-driven region screencast → GIF plugin#766
feat(screencast-gif): add hotkey-driven region screencast → GIF plugin#766mewmewmemw wants to merge 3 commits into
Conversation
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as resolved.
This comment was marked as resolved.
|
The two auto-quality comments above were generated against the first two commits, which had hardcoded English strings in EN is the only locale shipped for now — happy to follow up with translations or accept community PRs for them. |
a7057ab to
d3ac414
Compare
spiros132
left a comment
There was a problem hiding this comment.
Some minor feedback about the PR! :)
| property var pluginApi: null | ||
| property bool recordingActive: false | ||
|
|
||
| readonly property string scriptPath: pluginApi?.pluginDir ? pluginApi.pluginDir + "/screencast-gif.sh" : "" |
There was a problem hiding this comment.
You could use the following shorter syntax pluginApi?.pluginDir + "/screencast-gif.sh" ?? "" instead.
| Process { | ||
| id: checker | ||
| running: false | ||
| command: ["sh", "-c", "[ -f /tmp/screencast-gif.pid ] && kill -0 \"$(awk '{print $1}' /tmp/screencast-gif.pid 2>/dev/null)\" 2>/dev/null && printf 1 || printf 0"] |
There was a problem hiding this comment.
Would it be possible to have this script have its own script file? For better debugging and organization.
| "description": "Hotkey-driven region screencast that produces an animated GIF and copies it to the clipboard. Bar pill turns red while recording. Backed by wf-recorder + gifski.", | ||
| "tags": [ | ||
| "Bar", | ||
| "Recording", |
| "Recording", | ||
| "Hyprland", | ||
| "Sway", | ||
| "GIF", |
There was a problem hiding this comment.
This tag doesn't exist either.
| | [`slurp`](https://github.com/emersion/slurp) | region selection | `slurp` | | ||
| | `ffmpeg` | extract frames from the captured mp4 | `ffmpeg` | | ||
| | `wl-clipboard` | clipboard plumbing (`wl-copy`) | `wl-clipboard` | | ||
| | `flock` (util-linux) | invocation locking | `util-linux` | |
There was a problem hiding this comment.
Why is this requirement needed? I'm a bit confused.
Summary
Adds screencast-gif — a toggle-style screen recorder for wlroots
compositors that selects a region with
slurp, records it withwf-recorder, converts the result to an animated GIF withgifski, andcopies the GIF straight to the Wayland clipboard. The bar widget turns red
while recording is active.
Features
slurpand startsthe recorder, second press stops it, runs the GIF conversion, and copies
the result to the clipboard
Color.mErrorred whilerecording is active, click to start/stop
wl-copy --type image/gif, ready to paste intoTelegram / Discord / Element / etc.
MAX_SECSsafety net so aforgotten recording can't fill the disk
auto-stop seconds
Requirements
wf-recorder,gifski,slurp,ffmpeg,wl-clipboard(
util-linuxforflock,libnotifyfornotify-send)IPC
New tags proposed
The manifest uses two tags that don't yet appear in
registry.json/README.md: Recording and GIF. Both aremaximally descriptive for discoverability and there's no good existing
tag that captures "screen recording" or "animated GIF output". Happy to
drop or rename either if the maintainers prefer.
Test plan
qs ipc call plugin:screencast-gif togglestarts/stopsimage/gif(verified withwl-paste --list-types)OUTDIR(default~/Screenshots/screencast_*.gif)MAX_SECSand produces a GIFprevious conversion is still running
preview.pngis 960×540 (16:9)manifest.json,README.md,preview.png)pluginApi,screen,widgetId,section,sectionWidgetIndex,sectionWidgetsCount)repositoryfield points atnoctalia-dev/noctalia-pluginsregistry.jsonchange in the PR(https://github.com/mewmewmemw/noctalia-screencast-gif)