Skip to content
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

Add filename to play on success or failure #786

Open
alanvardy opened this issue May 30, 2024 · 8 comments
Open

Add filename to play on success or failure #786

alanvardy opened this issue May 30, 2024 · 8 comments
Assignees
Labels
doc For documentation-related (not code) issues

Comments

@alanvardy
Copy link
Owner

alanvardy commented May 30, 2024

For people who want more than a terminal bell on success or failure we could get them to add a path to their config

play_path_on_success and play_path_on_failure. They will be nullable strings.

@stacksjb
Copy link
Collaborator

Thx! I will document example config for this.

And down the road probably add something to config settings options so newbies don't have to manually edit config

@stacksjb stacksjb added the doc For documentation-related (not code) issues label May 30, 2024
@stacksjb stacksjb self-assigned this May 30, 2024
@alanvardy
Copy link
Owner Author

Yes, I agree.

@stacksjb
Copy link
Collaborator

Also - does "success" and "failure" equal "task completion"? I was looking for "task completion" and "task creation", not specifically general command/code success/failure (though error/failure is good for terminal bell).

This is basically to strictly replicate the dopamine fix when you check off the task in the official client 😬

@alanvardy
Copy link
Owner Author

alanvardy commented Jun 8, 2024

If a task is completed or created that would be a success but yes, any successfully completed command is also a success and would trigger the bell.

Are you looking to play a sound file every time:

  • You create a task
  • You complete a task
  • You complete each item in list process <- this too?

I'm sensitive to sounds and notifications, so this feature doesn't intuitively appeal to me, but I do like it getting a sound if something errors, and I need to look at it. Does the list above meet your needs? If yes, I can maybe do:

  • play_path_on_success
  • play_path_on_failure
  • play_path_on_completion

and also add

  • bell_on_completion

@stacksjb
Copy link
Collaborator

stacksjb commented Jun 8, 2024

Yes, add/create task and complete task (doesn't matter where, if from list process or tod task next)

A thought I had today - maybe for future automation and compatibility, this might be made modular/flexible so instead of "Play sound" it could be "execute command"?

I'm thinking about possible smarthome integration or other possibilities down the road (such as webhook or executing another program)

Possibly too complicated and if so no worries, just thinking outside the box :)

@alanvardy
Copy link
Owner Author

Really good ideas. I can do the *_on_completion ones and will think about the execute command.

@alanvardy
Copy link
Owner Author

Rodio would probably be a good option for this:
https://github.com/RustAudio/rodio

@stacksjb
Copy link
Collaborator

stacksjb commented Feb 4, 2025

Yes - I use Rodio to play sound which works great in the generalized wrapper I wrote. See https://github.com/stacksjb/Shell_Command_Menu/blob/main/src/utils.rs for an example of how I have it setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc For documentation-related (not code) issues
Projects
None yet
Development

No branches or pull requests

2 participants