rtimer is a command-line countdown timer application written in Rust. It displays an ASCII clock and plays a sound when the timer expires.
- Set countdown timer with flexible duration formats (e.g., 1h30m, 45m, 30s)
- Set timer to a specific time of day (e.g., 14:30:00)
- ASCII clock display with colored hour and minute hands
- Customizable alarm sound (default: rooster.mp3)
- Shows remaining time and elapsed time
- Desktop notifications using libnotify
- Customizable notification message
To install rtimer, you need to have Rust and Cargo installed on your system. Then, follow these steps:
- Clone the repository:
git clone https://github.com/yourusername/rtimer.git cd rtimer
- Build the project:
cargo build --release
- The binary will be available in
target/release/rtimer
Run rtimer with the following syntax:
rtimer [OPTIONS] <TIME>
<TIME>
: Duration of the timer (e.g., 10m, 1h30m) or fixed time (e.g., 14:30:00)
Options:
-s, --sound <FILE>
: Path to a custom sound file (default: rooster.mp3)-m, --message <MESSAGE>
: Custom notification message-h, --help
: Print help information-V, --version
: Print version information
Examples:
- Set a timer for 25 minutes:
rtimer 25m
- Set a timer for 1 hour and 30 minutes with a custom sound:
rtimer -s /path/to/custom/sound.mp3 1h30m
- Set a timer to go off at 2:30 PM:
rtimer 14:30:00
- Set a timer for 45 minutes with a custom notification message:
rtimer -m "Coffee break over!" 45m
rtimer uses the following Rust crates:
- clap
- rodio
- chrono
- termion
- notify-rust
These dependencies are managed by Cargo and will be automatically downloaded and compiled when building the project.
Contributions to rtimer are welcome! Please feel free to submit a Pull Request.
Licensed under either of
Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.