Skip to content

Add Stopwatch plugin to the store - #509

Merged
RadiatorTwo merged 1 commit into
RadiatorTwo:masterfrom
resper:add-stopwatch-plugin
Oct 18, 2026
Merged

RadiatorTwo merged 1 commit into
RadiatorTwo:masterfrom
resper:add-stopwatch-plugin

Conversation

@resper

@resper resper commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Adds Stopwatch (stopwatch) to the Plugin Store.

What it does

  • Stopwatch on a touch button: tap starts, tap again stops, hold (0.7 s) resets to zero
  • Five precisions as separate commands (minutes, seconds, 1/10 s, 1/100 s, milliseconds); sub-second digits through IAnimatedDisplayCommand, a frame is only pushed when the picture changed
  • Named stopwatches shared between buttons; Start / Pause / Toggle / Reset for any control and the CLI
  • State persisted across restarts; English and German strings
  • SDK 1.27, platform-independent package (any)

One thing to flag: hold-to-reset
The SDK reports presses but not releases. To tell a hold from a tap, the plugin reads the host's ambient TriggerPressScope.Current (the press token the macro engine uses for "wait until trigger released") via reflection and awaits its Released task. Every step is guarded: if the type or its members change, the button falls back to plain tap-to-toggle, Stopwatch.Reset keeps working, and the plugin logs on load which mode is active.

If you would rather not have plugins depend on that, an official release signal in the SDK (for example a task on CommandContext that completes when the triggering press ends) would let me drop the reflection. Happy to switch.

@RadiatorTwo
RadiatorTwo merged commit ccefed7 into RadiatorTwo:master Oct 18, 2026
1 check passed
@RadiatorTwo

Copy link
Copy Markdown
Owner

Thanks for the contribution.
Nice Plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants