Skip to content

Give sliders a separate last stop, so Amphetamine's can keep the Mac awake indefinitely #399

Closed

Description

@M4n0x

Problem

The Amphetamine package's duration slider runs from 15 to 240 minutes in 15-minute steps, both in its hover controls and in its popup. It can't start an indefinite session. Only the popup's separate Keep awake indefinitely row can, and the popup opens only when the package's Click the bar widget to setting is controls. With the default, toggle, the hover slider is the only control, so an indefinite session is out of reach from the bar.

A slider block can't express this today. It is a native Slider with an evenly stepped min…max range. A package could add one more step, say 255, and treat it as "indefinitely". But that step looks like any other, nothing on the track shows where the timed range ends, and the value beside the slider comes from the script, so it can't read ∞ while you drag.

Proposal

Mockup: today's hover slider, then the slider with an end stop at 4 h and on ∞

  • An optional endStop on slider blocks, in popups and in hoverLayout: "endStop": { "value": 0, "label": "∞" }.
  • The slider draws its steps from min to max as today. Then come a notch (a short gap with a hairline) and a short last stretch of track for the end stop. Under the end stop, the label takes the place of a step dot.
  • Dragging past max holds the knob at max until the pointer is a few points past the notch. Then it snaps onto the end stop, with the alignment haptic that edit mode already plays. Dragging back returns it to max.
  • Releasing on the end stop runs onChange with the end stop's value in VALUE. When values[source] equals that value, the knob sits on the end stop.
  • The arrow keys step from max onto the end stop, and VoiceOver reads its label.
  • This needs the schema, the slider row in Popups and tests.

Then, in Seb-GRAF/stablebar-packages, after a StableBar release with this:

  • Amphetamine's two sliders use "endStop": { "value": 0, "label": "∞" }. Amphetamine itself starts an indefinite session with duration 0.
  • For 0, the scripts start an indefinite session, the value reads ∞, and the popup's start row reads Keep awake indefinitely.
  • The separate Keep awake indefinitely row goes away.

Possible today

Partly. Setting Click the bar widget to to controls gives the popup's Keep awake indefinitely row, but then a click no longer toggles the session. A package can also add an unmarked extra step past max, with the limits above.

Related

Triaged by Claude Code (Claude Opus 5.5).

Activity

  1. added
    enhancement
    on Nov 1, 2026
  2. stablebar-releases commented on Nov 2, 2026

    @stablebar-releases

    🎉 This issue has been resolved in version 0.10.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions