A simple program that plays a jingle at an interval. To be used to notify the user to take a break.
Find a file
Stephen Seo 3875248c83
All checks were successful
Build for Releases / ensure-release-exists (push) Successful in 3s
Build for Releases / push-build-x86_64 (push) Successful in 3s
Build for Releases / push-build-aarch64 (push) Successful in 27s
Build for Releases / push-build-x86_64_debian (push) Successful in 30s
Build for Releases / push-build-aarch64_debian (push) Successful in 5m8s
Update Changelog.md, version 1.3.4
2024-10-03 23:03:56 +09:00
.forgejo/workflows Fix Debian build in workflow/action 2024-10-03 23:01:00 +09:00
src Make flag used by signal "volatile" 2024-10-03 20:58:59 +09:00
.gitignore Init commit version 1.0 working program 2024-06-10 13:25:11 +09:00
Changelog.md Update Changelog.md, version 1.3.4 2024-10-03 23:03:56 +09:00
CMakeLists.txt Compiler hardening flags, fixes related to flags 2024-10-01 17:20:06 +09:00
LICENSE Init commit version 1.0 working program 2024-06-10 13:25:11 +09:00
README.md Version 1.3, update README.md 2024-06-14 21:50:54 +09:00

break_interval

This simple program plays a jingle at a specified interval in minutes. It is meant to be used as a way to notify the user to take a break when the interval jingle plays.

# For usage:
> ./break_interval --help
./program [minutes] [file_to_play_on_interval] [player_program] [player_args...]
  minutes defaults to 5, file defaults to internal file, program defaults to "/usr/bin/mpv".
Note that this program uses execl/execv, so if a program is specified, it must be the full path to the program.

Running the program with no args will default to playing a jingle every 5 minutes.

If [player_program] is specified (with full path) like with /usr/bin/ffplay, then the command executed will look like:

/usr/bin/ffplay <file_to_play>

If [player_args...] is specified like with --flag and --another-flag, then the command executed will look like:

/usr/bin/ffplay --flag --another-flag <file_to_play>

It may be recommended to use a command like:

./break_interval 5 /my/music/file.mp3 /usr/bin/ffplay -nodisp

Which will execute (every 5 minutes):

/usr/bin/ffplay -nodisp /my/music/file.mp3

To play the internal file instead of a specified one, use the parameter "INTERNAL_FILE" for the filename and break_interval will play the internal file.

./break_interval 5 INTERNAL_FILE /usr/bin/ffplay -nodisp