Skip to content

Add optional clipboard capture sounds - #3

Merged
tarikbc merged 2 commits into
tarikbc:mainfrom
brzvsk:feat/copy-sound
Sep 11, 2026
Merged

Add optional clipboard capture sounds#3
tarikbc merged 2 commits into
tarikbc:mainfrom
brzvsk:feat/copy-sound

Conversation

@brzvsk

@brzvsk brzvsk commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Adds a compact Copy Sound dropdown in General settings with Off, Bubble, and Click
  • Keeps sound disabled by default and previews a sound when it is selected
  • Plays the selected sound only after a clipboard item is successfully saved
  • Also supports successful shelf Cmd+C from Add standard shelf keyboard actions #1 without re-ingesting or duplicating the marked pasteboard write
  • Bundles short, loudness-matched WAV assets and records their sources, licenses, hashes, and processing notes

Testing

Integration note

This PR and #1 build independently. A small successful-copy notification added to #1 connects shelf Cmd+C to this optional feedback while preserving the clipboard monitor own-write suppression.

brzvsk and others added 2 commits September 10, 2026 22:08
The two bundled WAVs are gone. Both source licences (Pixabay and Mixkit)
forbid handing their audio over as a standalone file, and a file committed
to a public repository is downloadable on its own, so shipping them from a
GPL-3.0 tree was a licence its own terms could not carry. `NSSound(named:)`
reaches the sounds macOS already ships, which costs nothing in the bundle
and follows the listener's output device and alert volume. Pop and Tink
stand in for Bubble and Click; adding another is one case in the enum.

That also removes SOUND_LICENSES.md, which XcodeGen was sweeping into
Contents/Resources and shipping inside the app.

Drops the notification hop. `copyToClipboard` calls the player directly,
so the player no longer reads UserDefaults.standard behind SettingsStore's
back to answer an event, and nothing has to be woken early to listen.

Restores the Shelf Size picker to .segmented. It was changed to .menu in
passing and has nothing to do with sound.
@tarikbc

tarikbc commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Off by default was the right instinct, and documenting the audio sources with hashes is more care than most people take. That care is also what surfaced the problem.

I rebased and pushed one commit with four changes:

  1. The bundled audio is gone, replaced by the macOS system sounds. Both licences you cited forbid distributing the file on a standalone basis, and a .wav committed to a public repo is exactly that, so a GPL-3.0 tree could not carry them. NSSound(named:) reaches what macOS already ships: nothing in the bundle, no licence question, and it follows the listener's output device and alert volume. Pop and Tink stand in for Bubble and Click. If you want distinctive audio later, it needs a CC0 or equivalent source that allows redistribution.

  2. SOUND_LICENSES.md was shipping inside the app. XcodeGen sweeps the whole Copy directory, so it landed in Contents/Resources. I confirmed that in the built bundle. Removing the folder solved it.

  3. Dropped the notification hop. copyToClipboard now calls the player directly. That also removes playPersistedSelection, which read UserDefaults.standard behind SettingsStore and duplicated the persistence contract.

  4. Reverted the Shelf Size picker to .segmented. It moved to .menu in this PR without being mentioned. Unrelated changes are much easier to review on their own.

Builds clean, bundle verified free of stray resources. Merging.

@tarikbc
tarikbc merged commit 4ad81b3 into tarikbc:main Sep 11, 2026
1 check passed
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