focus icon indicating copy to clipboard operation
focus copied to clipboard

Play sound after session or breaks

Open jonnieey opened this issue 2 years ago • 5 comments

Is it possible to play a sound after a session and after break (like a beep or notification sound) in addition to the system notification?

jonnieey avatar Jun 17 '22 09:06 jonnieey

@jonnieey It's possible to play ambient sounds, but I'll look into adding support for a beeping sound soon

ayoisaiah avatar Jun 18 '22 10:06 ayoisaiah

@ayoisaiah Like not during a session or a break, when a sesion or a break ends. For example, when we transition from a task session to a break session, play a beep on that transition to notify of change.

--notification-sound beep or -ns beep

jonnieey avatar Jun 18 '22 12:06 jonnieey

@jonnieey Yes I understand, thanks for the clarification. Will get it done soon :)

ayoisaiah avatar Jun 18 '22 16:06 ayoisaiah

Or maybe allow user to run custom commands for each transition or event. eg --short-break-cmd = paplay beep.mp3

jonnieey avatar Jun 20 '22 06:06 jonnieey

Or maybe allow user to run custom commands for each transition or event. eg --short-break-cmd = paplay beep.mp3

That makes a lot of sense actually. I'll provide a default and a way to override it 👍

ayoisaiah avatar Jun 20 '22 07:06 ayoisaiah

Closed via https://github.com/ayoisaiah/focus/commit/44098660e10998b56c3488787467afd07d8f6114

ayoisaiah avatar Sep 26 '22 20:09 ayoisaiah

@jonnieey The default system notification sound should play after each session along with the notification. You can build from source to test it out.

Also, I've added a --session-cmd option for running arbitrary commands after a session.

ayoisaiah avatar Nov 21 '22 22:11 ayoisaiah

@jonnieey The default system notification sound should play after each session along with the notification. You can build from source to test it out.

Also, I've added a --session-cmd option for running arbitrary commands after a session.

The cmd arg --session-cmd works but not from configuration session_cmd

jonnieey avatar Feb 23 '23 00:02 jonnieey

Screenshot from 2023-02-23 08-35-29

I'm not able to reproduce. Are you on v1.3.0?

ayoisaiah avatar Feb 23 '23 07:02 ayoisaiah

Updated and now it works, thanks

jonnieey avatar Feb 23 '23 08:02 jonnieey