Repository navigation
feat: add a preview for the Amphetamine package - #30
Merged
Merged
Conversation
This was referenced Nov 12, 2026
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.
Package
Amphetamine 1.2.1. It was the only package without a preview, so its row in the README and its Store card had no picture. It now shows the bar widget during a timed session: the pill and 42 minutes left.
This also lets setup suggest Amphetamine when it finds the app (#28, stablebox/StableBar#405): the suggestions check requires a preview. Once this and #28 are both merged, one line in
suggestions.jsonadds it:{ "when": { "apps": ["com.if.Amphetamine"] }, "packages": ["amphetamine"] }. I kept it out of this pull request so the two don't depend on each other.Changes
preview.png: 520 × 144, like the other previews. StableBarmaindrew it offscreen with--render-scenesfrom the installed package, so the widget is the package's own layout with sample output, not a mock-up. The scene's tile and background match the existing previews: drawing Homebrew outdated the same way gives the same tile position and size as its published preview."screenshot": "preview.png"and version 1.2.1. The scripts andconfig.jsondon't change../scripts/update-readme.sh).Access
Unchanged:
osascriptagainst Amphetamine (automation), no tools inrequires, no hosts.Testing
STABLEBAR=<StableBar main, cdafc4b> ./scripts/check-package.sh packages/amphetamine: inspect, install into a scratch configuration and validate pass ("Valid configuration: 1 widgets in 3 files")../scripts/check-versions.sh origin/mainpasses.With this preview, feat: list the packages StableBar's setup suggests for tools found on the Mac #28's
scripts/check-suggestions.shpasses with Amphetamine added tosuggestions.json.Drawn offscreen only: nothing ran and no second bar opened. The package was installed into a scratch configuration with
--config … --install-package, and the scene sat beside it:Scene and configuration
scene.json:{ "configuration": "config.json", "outputs": { "amphetamine": { "text": "42m", "icon": "pill.fill", "values": { "duration": 60 } } }, "draw": "bar", "appearances": ["light"], "width": 260, "height": 72 }config.json:{ "bar": { "height": 72, "style": { "background": "#ebedf2", "borderWidth": 0, "cornerRadius": 0 } }, "defaults": { "borderColor": null, "shadowColor": null }, "packages": [{ "id": "amphetamine", "version": "1.2.0" }], "widgetOverrides": { "amphetamine": { "position": "center", "style": { "height": 34, "paddingHorizontal": 12, "background": "#ffffff" } } } }The scene frame's rounded edge was painted over with the background colour afterwards.
Claude Opus 5.5 via Claude Code