Skip to content

feat: show the volume only for a moment after it changes - #157

Merged
M4n0x merged 1 commit into
mainfrom
feat/sound-volume-on-change
Oct 21, 2026
Merged

M4n0x merged 1 commit into
mainfrom
feat/sound-volume-on-change

Conversation

@M4n0x

@M4n0x M4n0x commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Problem

The Sound widget shows the volume beside its speaker icon all the time. The number matters right after you change the volume; the rest of the time it takes room in the bar.

Changes

  • Sound's default look is now its speaker icon alone. After the volume or mute state changes, the percentage fades in beside the icon for 1.5 seconds, its digits rolling (numeric) while it keeps changing, then fades out. Muting hides it at once. The bar animates the widget's width as the number comes and goes, as it does for the active app; nothing animates under Reduce Motion.
  • audio source: when a read's volume or mute state differs from the read before (the same rule as volumeChange), its output carries a temporary with fields.changedVolume (62%, empty while muted or without a volume control). The first read carries none, and text is still the volume, so popups, custom layouts and the overflow menu are unchanged. Custom layouts can use changedVolume with hideWhenEmpty for the same effect.
  • Settings → Bar → Content → Display: sound now starts on Icon, value on change, its default. Icon and value writes the icon-and-value row as a layout. Battery keeps its choices.
  • temporary outputs of every widget now come and go with the widget's animation instead of switching instantly.
  • README: the default layouts, the Display choices, the audio source and temporary.

Surfaces: no new configuration property, so the schema and decoders are unchanged. Settings changes only the Display picker. Includes, templates and profiles reach it through the existing layout.

Testing

  • swift test: 275 XCTest and 385 Swift Testing tests pass.
  • New tests:
    • The audio source flags a change, flags muting as empty, and stays quiet on the first read and on a device switch at the same volume.
    • The Sound widget draws like an icon-only widget at rest, wider with the volume, and like the icon again when muted, for both type: audio and a named audio provider.
    • Sound widgets animate their resize, but not when first measured and not under Reduce Motion.
    • Sound's Display choices round-trip, and Undo restores the file.
  • Live check on a scratch bar with Bluetooth earbuds: volume keys, AppleScript volume changes, mute and unmute. Screenshots and a recording are below.
  • Not checked: VoiceOver now reads only the speaker icon at rest, not the volume.
Before (main) After, at rest After, just changed
before-main.png after-rest.png after-change.png

Recording: after-change.gif

Merging

One commit, so any merge method keeps it.

Claude Opus 5.5 via Claude Code

The Sound widget showed the volume beside its icon all the time. It now
shows only its speaker icon. After the volume or mute state changes, the
percentage fades in beside the icon for 1.5 seconds, its digits rolling
while it keeps changing, then fades out, and the bar animates the
widget's width. Muting hides it at once.

Settings > Bar > Content > Display starts sound on "Icon, value on
change", its new default, and "Icon and value" now saves that look as a
layout. Battery keeps its choices.

The audio source adds a `temporary` with `fields.changedVolume` when a
read differs from the one before, so custom layouts can do the same; its
`text` is still the volume. Every `temporary` output now comes and goes
with its widget's animation, unless Reduce Motion is on.
@M4n0x
M4n0x requested a review from Seb-GRAF as a code owner October 21, 2026 14:18
@M4n0x
M4n0x merged commit a8a994a into main Oct 21, 2026
4 checks passed
@M4n0x
M4n0x deleted the feat/sound-volume-on-change branch October 21, 2026 14:28
@stablebar-releases

Copy link
Copy Markdown

🎉 This PR is included in version 0.6.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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant