focuz

Crates.iofocuz
lib.rsfocuz
version0.0.1
created_at2025-09-04 07:17:31.471983+00
updated_at2025-09-04 07:17:31.471983+00
descriptionLightweight Beautiful Terminal Pomodoro Timer
homepage
repositoryhttps://github.com/shiyasmohd/focuz
max_upload_size
id1823787
size521,456
Shiyas Mohammed (shiyasmohd)

documentation

README

๐ŸŽฏ Focuz

Lightweight Beautiful Terminal Pomodoro Timer

Crates.io Crates.io License Contributors


Screenshot

๐Ÿ› ๏ธ Prerequisites

๐Ÿ“ฆ Installation

cargo install focuz

๐Ÿš€ Usage

# Run a timer for specific duration
focuz <duration>

Examples

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

Key Action
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

# 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

# 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 file for details.

Made with โค๏ธ in Rust ๐Ÿฆ€
Commit count: 3

cargo fmt