- Rust - Install Rust
cargo install focuz
# Run a timer for specific duration
focuz <duration>
focuz 10s # 10 seconds timer
focuz 5m # 5 minutes timer
focuz 2h # 2 hours timer
focuz 90 # 90 seconds (no suffix defaults to seconds)
s
or no suffix - seconds (e.g.,30s
or30
)m
- minutes (e.g.,5m
)h
- hours (e.g.,2h
)
Key | Action |
---|---|
q or Esc |
Quit the timer |
Ctrl+C |
Force quit |
- Start Sound - Plays when timer begins
- End Sound - Plays when timer completes
# Clone the repository
git clone https://github.com/shiyasmohd/focuz.git
cd focuz
# Build the project
cargo build --release
# Run directly
cargo run -- 5m
# Run all tests
cargo test
# Run with output
cargo test -- --nocapture
focuz/
├── src/
│ ├── main.rs # Entry point
│ ├── cli/ # Command-line interface
│ │ ├── mod.rs
│ │ └── cli.rs # CLI parsing and duration handling
│ └── timer/ # Timer functionality
│ ├── mod.rs
│ ├── timer.rs # Core timer logic
│ ├── display.rs # ASCII art display
│ └── sound.rs # Audio notifications
├── sounds/ # Audio files
│ ├── start.wav
│ └── end.mp3
├── Cargo.toml
└── README.md
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ in Rust 🦀