Add ImageMagick Clock plugin#46
Conversation
f6d3e7b to
c06df8a
Compare
There was a problem hiding this comment.
Pull request overview
Adds a new community plugin (jinliu/imagemagick-clock) that renders a bar clock by shelling out to ImageMagick (or another CLI renderer) to generate an image and display it in the widget.
Changes:
- Introduces a new Luau bar widget that generates clock-face images on an interval and updates the displayed image.
- Adds initial plugin manifest (
plugin.toml) and user-facing documentation (README.md) for configuration and requirements. - Adds English settings translations for the widget configuration UI.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| imagemagick-clock/widget.luau | Implements the async image generation + widget update + click behavior. |
| imagemagick-clock/plugin.toml | Declares plugin metadata, widget entry, settings, and dependencies. |
| imagemagick-clock/README.md | Documents usage, requirements, and settings for the plugin. |
| imagemagick-clock/translations/en.json | Provides English labels/descriptions for settings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
510a7f7 to
2f7714e
Compare
ImageMagick Clock draws a custom clock using ImageMagick (or any other CLI image drawing tool).
2f7714e to
3706c25
Compare
|
• 1. blocking - imagemagick-clock/widget.luau:44 The move of next.png and generation of the following image run concurrently on independent worker threads. Generation can truncate or open next.png before the move finishes, causing current.png to contain a partial or future image and leaving no next.png for the following update. Start the next generation from the move callback, or use unique temporary filenames.
When XDG_RUNTIME_DIR is unavailable, the plugin uses the predictable shared path /tmp/imagemagick-clock without verifying ownership or securely creating it. Another local user could pre-create that directory and plant next.png as a symlink, causing ImageMagick to overwrite another user-writable file. Use
The manifest declares only imagemagick, but the plugin also executes mkdir and mv. Repository policy requires every external command to be declared in dependencies and documented under README requirements. Add both commands and their README entries.
The command described as the default is not the manifest default. The documented command uses 300x110 with day/month-name/year, while the actual default uses 270x100 with month/day/weekday. Synchronize the example so users see the behavior they are being told to expect. Also please regenerate the thumbnail with the generator, I made the title font dynamic to avoid overlapping on the screenshot, so it should look a bit better. |
|
Thank you! |
Plugin
jinliu/imagemagick-clockplugin.toml)What it does
ImageMagick Clock draws a custom clock using ImageMagick (or any other CLI image drawing tool).
External dependencies
imagemagick
Testing
Screenshots / Videos
Checklist
idafter the/inplugin.tomlexactly.plugin.toml,README.md,thumbnail.webp, andtranslations/en.json.README.mdfollows theREADME template, documents
every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.
thumbnail.webpwith the thumbnail generator.versionfollows semver and is bumped in this PR;plugin_apiis the oldest API level this plugin requires.understand that language well enough to review and maintain it (no unreviewed machine/LLM translations).
catalog.toml; CI generates it.Code review attestation
Plugins run as trusted, unsandboxed Luau in the user's session. Confirm:
licensedeclared inplugin.toml.