https://github.com/yasso9/prayer-times
Islamic prayer times informations notifications based on your geographical location
https://github.com/yasso9/prayer-times
arch-linux cli-app islam islamic-prayer-times muslim muslim-prayer-times notifications rust shell
Last synced: 2 months ago
JSON representation
Islamic prayer times informations notifications based on your geographical location
- Host: GitHub
- URL: https://github.com/yasso9/prayer-times
- Owner: Yasso9
- Created: 2024-01-15T10:56:06.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-25T20:36:02.000Z (about 1 year ago)
- Last Synced: 2025-07-21T05:27:38.008Z (3 months ago)
- Topics: arch-linux, cli-app, islam, islamic-prayer-times, muslim, muslim-prayer-times, notifications, rust, shell
- Language: Rust
- Homepage:
- Size: 164 KB
- Stars: 11
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Prayer Times
## Overview
`prayer-times` is a program that provides Islamic prayer times notifications based on your geographical location. It calculates prayer times for Fajr, Dhuhr, Asr, Maghrib, and Isha using specified calculation methods and adjustments.
It uses accurate calculation of prayer times based on geographical coordinates based on the algorithm provided by [praytimes.org](http://praytimes.org/).
## Installation
### Arch linux
`prayer-times` is available in the [AUR](https://aur.archlinux.org/). You can install it with yay or paru depending on what you have.
```sh
yay -S prayer-times
```or
```sh
paru -S prayer-times
```### Manual
Clone the repository and build the executable. You should have `cargo` installed:
```sh
git clone https://github.com/Yasso9/prayer-times
cd prayer-times
cargo build --release
```## Usage
```man
Usage: prayer-times [OPTIONS] [COMMAND]Commands:
deamon Start the process that will send notifications on prayers time [default]
current Get the current prayer
next Get the next prayer
list-prayers List all the prayers of the current day
list-methods List all methods available for the calculation of the prayer times
list-madhab List all madhab available for the calculation of the prayer times
dry-run Show the next prayer in a notification to test if everything works
config Get the path of the toml config file
generate-shell Generate shell completions and man pages
help Print this message or the help of the given subcommand(s)Options:
-l, --latitude Latitude. Defaults to the current location
-L, --longitude Longitude. Defaults to the current location
-m, --method Calculation Method to use
-M, --madhab Madhab to use
--fajr-mod Minutes to add or remove to the Fajr time
--dohr-mod Minutes to add or remove to the Dohr time
--asr-mod Minutes to add or remove to the Asr time
--maghrib-mod Minutes to add or remove to the Maghrib time
--isha-mod Minutes to add or remove to the Isha time
--notify-before Show notification 10 minutes before prayer time [default: false] [possible values: true, false]
--icon Custom icon path for notifications
--urgency Notification urgency
-h, --help Print help
-V, --version Print version
```You can also configurate the program from a config file located in `$XDG_CONFIG_HOME/prayer-times/config.toml`. Here is the default config :
```toml
[prayer]
method = "MuslimWorldLeague"
madhab = "Shafi"
fajr_mod = 0
dohr_mod = 0
asr_mod = 0
maghrib_mod = 0
isha_mod = 0[notification]
notify_before = false
urgency = "Critical"
interval = 20
```If you specify cli arguments, it will always take precedence on what you have on your config. If you don't specify any latitude and longitude it will be infered from your IP address. Location from an IP address is not always totally accurate so I advise you greatly to specify your own latitude and longitude if you want to have the most accurate prayer time.
## Examples
`prayer-times next`
```sh
Adhan Dhuhr in 01:13
````prayer-times list-prayers`
```sh
Prayer times:
Adhan Fajr at 07:32:32
Adhan Dhuhr at 13:55:24
Adhan Asr at 17:29:43
Adhan Maghrib at 20:23:24
Adhan Isha at 22:08:05
````prayer-times list-methods`
```sh
MuslimWorldLeague : [ fajr angle: 18, isha angle: 17 ]
NorthAmerica : [ fajr angle: 15, isha angle: 15 ]
Egyptian : [ fajr angle: 19.5, isha angle: 17.5 ]
UmmAlQura : [ fajr angle: 18.5, isha angle: 18.5 ]
Karachi : [ fajr angle: 18, isha angle: 18 ]
Tehran : [ fajr angle: 17.7, isha angle: 14 ]
Jafari : [ fajr angle: 16, isha angle: 14 ]
FranceUOIF : [ fajr angle: 12, isha angle: 12 ]
FranceGMP : [ fajr angle: 18, isha angle: 18 ]
````prayer-times list-madhab`
```sh
Madhab:
Shafi
Hanafi
```## License
This project is licensed under the [MIT License](LICENSE). Feel free to use and contribute to this open-source project.