Skip to content

ArthurHeymans/rtimer

Repository files navigation

🐓🐓🐓 rtimer 🐓🐓🐓

rtimer

rtimer is a command-line countdown timer application written in Rust. It displays an ASCII clock and plays a sound when the timer expires.

./screenshot.png

Features

  • 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

Installation

To install rtimer, you need to have Rust and Cargo installed on your system. Then, follow these steps:

  1. Clone the repository:
    git clone https://github.com/yourusername/rtimer.git
    cd rtimer
        
  2. Build the project:
    cargo build --release
        
  3. The binary will be available in target/release/rtimer

Usage

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:

  1. Set a timer for 25 minutes:
    rtimer 25m
        
  2. Set a timer for 1 hour and 30 minutes with a custom sound:
    rtimer -s /path/to/custom/sound.mp3 1h30m
        
  3. Set a timer to go off at 2:30 PM:
    rtimer 14:30:00
        
  4. Set a timer for 45 minutes with a custom notification message:
    rtimer -m "Coffee break over!" 45m
        

Dependencies

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.

Contributing

Contributions to rtimer are welcome! Please feel free to submit a Pull Request.

License

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.

About

Simple timer

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages