Skip to content

Custom sounds #337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nc7s opened this issue Mar 6, 2025 · 5 comments · May be fixed by #341
Open

Custom sounds #337

nc7s opened this issue Mar 6, 2025 · 5 comments · May be fixed by #341

Comments

@nc7s
Copy link
Contributor

nc7s commented Mar 6, 2025

Currently, we have some sounds hand picked by the authors baked into the compiled executable. It works, but has shortcomings. In Debian particularly, the included sound resources have too many copyright holders: even though they are OK license wise with CC0, we can't reliably attribute each to their respective author(s). I'll have to exclude them, and disable the sound feature for now. Allowing custom sounds won't solve the attribution problem, but does enable the feature.

Currently sounds are referred to by names, e.g. on_success = "play-sound(name=90s-game-ui-6,volume=50)". Presumably we can also refer by paths, e.g. play-sound(path=~/Audio/my-awesome-notification.mp3,volume=42).

We could also allow naming custom sounds, something like this:

# prefs.toml
[sound.collection]
my-awesome-notification = '~/Audio/my-awesome-notification.mp3'
# bacon.toml
[jobs.check]
on_success = 'play-sound(my-awesome-notification,volume=42)'
@Canop
Copy link
Owner

Canop commented Mar 6, 2025

No objection. If somebody's willing to work on the implementation, they're welcome.

@nc7s
Copy link
Contributor Author

nc7s commented Mar 6, 2025

I'll try to throw something together this weekend :>

@nc7s nc7s linked a pull request Mar 9, 2025 that will close this issue
@nc7s
Copy link
Contributor Author

nc7s commented Mar 9, 2025

Submitted a PR. In implementing it, though, I realized bacon.toml is often/sometimes committed to version control. It then poses a problem: if Alice configures a custom sound, then commits the bacon.toml, Bob won't be able to use it. There are various ways to work around that. But ultimately, should that be our concern?

@c-git
Copy link
Contributor

c-git commented Mar 9, 2025

Personally, in most of my projects I've decided it's not a problem and for project where other people need to use it and might run into an issue I copy over any setting that need to be shared to the top of bacon.toml

@nc7s
Copy link
Contributor Author

nc7s commented Mar 10, 2025

Nice to know the lifting trick, thanks ;)

Or support includes, but might complicate things a bit too far.

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 a pull request may close this issue.

3 participants