Metadata-Version: 2.4
Name: pyodoro
Version: 1.1.0
Summary: A background Pomodoro timer with prompt-integrated progress bars — start a session and keep using your terminal
Author: Simon Ni
License: MIT License
        
        Copyright (c) 2025 Simon Ni
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/NarezIn/pymodoro
Project-URL: Documentation, https://github.com/NarezIn/pymodoro#readme
Keywords: pomodoro,timer,productivity,TUI
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: emoji
Dynamic: license-file

# Pymodoro

[![Build and Test](https://github.com/NarezIn/pymodoro/actions/workflows/build-test.yaml/badge.svg)](https://github.com/NarezIn/pymodoro/actions/workflows/build-test.yaml)

A Pomodoro timer that runs in the background while you keep using your
terminal. Start a session and forget about it — the progress bar shows up
above your prompt every time you press Enter, and alerts appear when work
or break sessions end.

## Installation

```bash
pip install pyodoro
```

Requires Python 3.12+.

## Usage

```bash
pymodoro
```

You'll be prompted for work duration, break duration, and number of
cycles. Press Enter at each prompt to accept the defaults. The timer
starts in the background and you get your terminal back immediately.

### Commands

| Command | Description |
|---|---|
| `pymodoro` | Start an interactive Pomodoro session in the background |
| `pymodoro --show` | Show a live-updating progress bar (Ctrl+C to dismiss) |
| `pymodoro --status` | Print the current progress bar and time remaining |
| `pymodoro --stop` | Stop the running session |
| `pymodoro --check-notify` | Print progress bar and phase alerts (used by shell integration below) |
| `pymodoro --version` | Show the package version |

### Prompt integration (bash / zsh)

To see the progress bar above every command prompt, add this to your `~/.bashrc` (or `~/.zshrc`):

```bash
PROMPT_COMMAND="pymodoro --check-notify;${PROMPT_COMMAND}"
```

Now every time you press Enter, the tomato bar and timer appear right
above your prompt. When a work or break session ends, the alert appears
there too.

### VS Code terminal

If you use VS Code's integrated terminal, make sure it runs bash as a
login shell so it sources your `.bashrc`. In `settings.json`:

```json
"terminal.integrated.shellArgs.windows": ["-l"]
```

## Development

```bash
git clone https://github.com/NarezIn/pymodoro.git
cd pymodoro
pip install pipenv
pipenv install --dev
pipenv shell
```

### Running tests

```bash
python -m pytest tests/ --cov=pomodoro
```

## License

[MIT](./LICENSE)
