Metadata-Version: 2.4
Name: waybar-salah
Version: 0.1.0
Summary: Islamic prayer times widget for Waybar
Project-URL: Homepage, https://github.com/shahriyardx/waybar-salah
Project-URL: Source, https://github.com/shahriyardx/waybar-salah
Project-URL: BugTracker, https://github.com/shahriyardx/waybar-salah/issues
Author-email: Md Shahriyar Alam <contact@shahriyar.dev>
License-Expression: MIT
License-File: LICENSE
Keywords: adhan,islamic,prayer-times,salah,waybar
Classifier: Environment :: X11 Applications
Classifier: Intended Audience :: End Users/Desktop
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Desktop Environment :: Window Managers
Requires-Python: >=3.8
Requires-Dist: requests
Description-Content-Type: text/markdown

# Prayer Times — Waybar Widget

Shows Islamic prayer times in your status bar — auto-detects location via IP.

## What it does

- Displays how much time is left in the current prayer (e.g. "Isha 20m remaining")
- Shows "Forbidden 12m" during sunrise and midday periods when prayer isn't allowed
- Shows time until the next prayer when nothing is active (e.g. "Dhuhr in 1h")

## How to use

- **Left-click** the prayer time to switch between two display modes:
  - Context-aware (shows what matters right now)
  - Always show time until next prayer
- **Hover** over it to see the complete daily timetable

## Installation

### From PyPI (recommended)

```bash
uv tool install waybar-salah
```

Or with pip:

```bash
pip install waybar-salah
```

### From source

Requires [uv](https://docs.astral.sh/uv/).

```bash
uv tool install git+https://github.com/shahriyardx/waybar-salah
```

Or from a local copy:

```bash
cd /path/to/prayer-times
uv tool install .
```

Then add to your Waybar config:

```json
"custom/prayer": {
    "exec": "waybar-salah",
    "return-type": "json",
    "interval": 30,
    "on-click": "waybar-salah --toggle",
    "tooltip": true
}
```

Add some CSS to colour the states:

```css
#custom-prayer.current { color: #a6e3a1; }
#custom-prayer.forbidden { color: #f38ba8; }
#custom-prayer.next { color: #89b4fa; }
```

## Customisation

Open `src/waybar_salah/main.py` and change `CITY`, `COUNTRY`, or `METHOD` at the top.

| Method | Organisation |
|--------|-------------|
| 1 | University of Islamic Sciences, Karachi |
| 2 | Islamic Society of North America |
| 3 | Muslim World League |
| 4 | Umm Al-Qura, Makkah |
| 8 | University of Tehran |

## Files

```
src/waybar_salah/main.py     # main logic
pyproject.toml               # package config
cache.json                   # daily timings (auto-generated)
```
