Skip to content

Configuration

Youssef Fathy edited this page Apr 25, 2025 · 5 revisions

File location

The configuration uses YAML format and is named config.yml. By default, go-pray looks for the configuration file in the following locations:

  1. $XDG_CONFIG_HOME/go-pray
  2. $HOME/.config/go-pray
  3. $HOME/.go-pray

Additionally, a custom configuration file can be specified using the --config option.

Syntax

Language

The output language.

Available Values:

  • en: English (default)
  • ar: Arabic

Example:

language: ar

Location (required)

Defines the coordinates required for calculating prayer times. Obtain coordinates from tools like Map Coordinates.

Example:

location:
  lat: 30.001780
  long: 31.290419

Calculation Settings

The calculation section defines the method and parameters used to calculate prayer times.

Method (required)

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: EGYPT

Custom Parameters

This 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 (overrides isha_angle if 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 uses fajr_angle/60 and isha_angle/60 instead of 1/7th.

Example:

calculation:
  params:
    fajr_angle: 19.5
    isha_angle: 17.5
    isha_interval: 60
    madhab: SHAFI
    high_latitude_rule: MIDDLE

Adjustment

Adjust prayer times by adding or subtracting minutes from the calculated times.

Example:

calculation:
  adjustment:
    fajr: -5
    dhuhr: 3

Time Zone

The 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/Cairo

Adhan Audio File

The adhan field specifies the MP3 file to play at prayer times. Environment variables are supported.

Example:

adhan: $HOME/.local/share/qatami_takbeer.mp3

Notification

The notificaton section defines customizations for the prayer times notification sent at prayer time.

Notification Icon

Icon name in your current Icon theme. See predefined icons here.

notification:
  icon: dialog-information

Notification Text

Prayer 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 }}"