<div align="center">
# ๐ฏ Focuz
**Lightweight Beautiful Terminal Pomodoro Timer**
[](https://crates.io/crates/focuz)
[](https://crates.io/crates/focuz)
[](LICENSE-MIT)
[](https://github.com/shiyasmohd/focuz/graphs/contributors)
<br/>
</div>

## ๐ ๏ธ Prerequisites
- **Rust** - [Install Rust](https://doc.rust-lang.org/book/ch01-01-installation.html)
## ๐ฆ Installation
```bash
cargo install focuz
```
## ๐ Usage
```bash
# Run a timer for specific duration
focuz <duration>
```
### Examples
```bash
focuz 10s # 10 seconds timer
focuz 5m # 5 minutes timer
focuz 2h # 2 hours timer
focuz 90 # 90 seconds (no suffix defaults to seconds)
```
### Time Format
- `s` or no suffix - seconds (e.g., `30s` or `30`)
- `m` - minutes (e.g., `5m`)
- `h` - hours (e.g., `2h`)
## โจ๏ธ Keyboard Shortcuts
| `q` or `Esc` | Quit the timer |
| `Ctrl+C` | Force quit |
## ๐ Sound Notifications
- **Start Sound** - Plays when timer begins
- **End Sound** - Plays when timer completes
## ๐๏ธ Building from Source
```bash
# Clone the repository
git clone https://github.com/shiyasmohd/focuz.git
cd focuz
# Build the project
cargo build --release
# Run directly
cargo run -- 5m
```
## ๐งช Running Tests
```bash
# Run all tests
cargo test
# Run with output
cargo test -- --nocapture
```
## ๐ Project Structure
```
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
```
## ๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
## ๐ License
This project is licensed under the MIT License - see the [LICENSE](LICENSE-MIT) file for details.
<div align="center">
Made with โค๏ธ in Rust ๐ฆ
</div>