8000 GitHub - fietec/alarm: A minimalistic console alarm application in C
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fietec/alarm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alarm

A minimalistic alarm application written in C.

The library used for playing the audio is: miniaudio.h. NOTE: Due to the absence of getch in the C standard library, terminating a running alarm slightly differs between platforms.

How to build

Simply compile alarm.c into an executable.

gcc -o alarm alarm.c

How to use

To set an alarm run alarm with the following arguments:

alarm [..flags] <hour> <minute>

The supported arguments are:

  • <hour>: (int) hour of the alarm time
  • <minute>: (int) minute of the alarm time
  • --rings [-r] <rings>: (flag)[int] number or ringtones
  • --file [-f] <audio file>: (flag) [path] audio file to play (default: ./ringtones/alarm.wav)
  • --silent [-s]: (flag) disable ring tone
  • --help [-h]: (flag) print help info

For <hour> and <minute>, all arguments which are not valid integers are interpreted as 0. Therefore, e.g. running alarm like this:

alarm -s 09 fifteen

will result in the alarm going off at 09:00.

If the --silent flag is not set, the set ring tone will play at the specified alarm time.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A minimalistic console alarm application in C

Resources

License

Stars

Watchers

Forks

Languages

0