alanvardy / tod

An unofficial Todoist command line client written in Rust
MIT License
96 stars 9 forks source link

Add filename to play on success or failure #786

Open alanvardy opened 3 months ago

alanvardy commented 3 months ago

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 commented 3 months ago

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

alanvardy commented 3 months ago

Yes, I agree.

stacksjb commented 3 months ago

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 commented 3 months ago

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:

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:

and also add

stacksjb commented 3 months ago

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 commented 3 months ago

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