Repository navigation
Configuration
The configuration uses YAML format and is named config.yml. By default, go-pray looks for the configuration file in the following locations:
$XDG_CONFIG_HOME/go-pray$HOME/.config/go-pray$HOME/.go-pray
Additionally, a custom configuration file can be specified using the --config option.
The output language.
Available Values:
-
en: English (default) -
ar: Arabic
Example:
language: arDefines the coordinates required for calculating prayer times. Obtain coordinates from tools like Map Coordinates.
Example:
location:
lat: 30.001780
long: 31.290419The calculation section defines the method and parameters used to calculate prayer times.
Specifies the prayer times calculation method. Refer to Aladhan Calculation Methods for more details on each method.
Available Values:
-
EGYPT(Egyptian General Authority of Survey) -
MWL(Muslim World League) -
KARACHI(University of Islamic Sciences, Karachi) -
UAQ(Umm al-Qura University, Makkah) -
DUBAI(The Gulf Region) -
ISNA(Islamic Society of North America) -
KUWAIT(Kuwait) -
QATAR(Qatar) -
SINGAPORE(Singapore) -
UOIF(Union des Organisations Islamiques de France) -
OTHER(Manually specify parameters)
Example:
calculation:
method: EGYPTThis subsection is required only if the method is set to OTHER. Define the custom parameters as follows:
-
fajr_angle: The angle of the sun used to calculate Fajr. -
isha_angle: The angle of the sun used to calculate Isha. -
isha_interval: Minutes after Maghrib for calculating Isha (overridesisha_angleif set). -
madhab: The juristic method used for Asr calculation. Possible values are:HANAFI-
SHAFI(Shafi/Hanbali/Maliki)
-
high_latitude_rule: Rules for high latitude areas. Possible values are:-
MIDDLE: Fajr will never be earlier than the middle of the night, and Isha will never be later than the middle of the night. -
SEVENTH: Fajr and Isha are restricted to the last and first seventh of the night, respectively. -
TWILIGHT: Similar to SEVENTH, but usesfajr_angle/60andisha_angle/60instead of 1/7th.
-
Example:
calculation:
params:
fajr_angle: 19.5
isha_angle: 17.5
isha_interval: 60
madhab: SHAFI
high_latitude_rule: MIDDLEAdjust prayer times by adding or subtracting minutes from the calculated times.
Example:
calculation:
adjustment:
fajr: -5
dhuhr: 3The timezone field specifies the IANA time zone identifier. If omitted, defaults to the local timezone.
Refer to the List of tz database time zones for valid values.
Example:
timezone: Africa/CairoThe adhan field specifies the MP3 file to play at prayer times. Environment variables are supported.
Example:
adhan: $HOME/.local/share/qatami_takbeer.mp3The notificaton section defines customizations for the prayer times notification sent at prayer time.
Icon name in your current Icon theme. See predefined icons here.
notification:
icon: dialog-informationPrayer time notification title and body can be templated using Go templates.
The following variables can be used in your template:
-
PrayerName: The current prayer name. -
CalendarName: The current prayer name (changes Dhuhr to Jumuaa on Fridays).
Example:
notification:
title: "Prayer Times"
body: "It is time for {{ .CalendarName }} Prayer"Can be also combined with the language configuration to send Arabic notifications:
language: ar
notification:
title: "مواقيت الصلاة"
body: "حان الآن وقت صلاة {{ .CalendarName }}"