Skip to content

AbdeltwabMF/next-prayer

Repository files navigation

Next Prayer

Islamic prayers reminder for Linux status bar


Installation

1. Arch-based distributions

yay -S next-prayer

2. Build from source

git clone https://github.com/abdeltwabmf/next-prayer.git
cd next-prayer
make all install

3. Docker image

  1. Use Docker Hub image by running the following commands:
docker pull abdeltwabmf/next-prayer
docker tag abdeltwabmf/next-prayer next-prayer
docker run --rm next-prayer next-prayer --version
  1. Build it yourself by running the following commands:
git clone https://github.com/abdeltwabmf/next-prayer.git
cd next-prayer
docker build -t next-prayer .
docker run --rm next-prayer next-prayer --version

Configuration

  1. After updating your configuration file save it locally and run the following command to fetch API data:
docker run --rm -v /path/to/your/config:/home/nextprayer/.config/next-prayer/np_config.py -v /path/to/your/data:/home/nextprayer/.local/share/next-prayer next-prayer np_fetch.py
  1. Afterword run the following command:
docker run --rm -v /path/to/your/data:/home/nextprayer/.local/share/next-prayer next-prayer next-prayer [options...]

🤔 Usage

Usage: next-prayer [options...]

Options:
  --help       Display this help message.
  --version    Version name.
  --next       Next prayer time.
  --all        All timings.
  --prev       Previous prayer time.
  --left       Time left to next prayer.
  --elapsed    Elapsed time since last prayer.
  --adhan      True if adhan is playing now.
  --hijri      Hijri date.
  --hybrid     The elapsed time since the previous prayer as far as the elapsed time <= THRESHOLD.

Use next-prayer options with docker as follows:

docker run --rm next-prayer next-prayer [options...]

Setup (Status bar)

Here are some examples how to setup the status bar with next-prayer:

1. dwmblocks

🌟 Add this 4-element Block to the blocks[] array in your config.h.

static const Block blocks[] = {
  /*Icon*/  /*Command*/              /*Update Interval*/  /*Update Signal*/
  {"🕌 ",    "next-prayer --hybrid",  29,                  0}
}

2. i3blocks

🌟 Add this section to your i3blocks config file.

[next-prayer]
command=next-prayer --hybrid
interval=29
label=<span>🕌 </span>
color=#FF8105
border=#FF8105
border_top=1
border_right=0
border_bottom=0
border_left=0

👀 If you're using the docker version Add docker run --rm next-prayer at the very beginning of your command.


🐣 Contributors

Abdeltwabmf
Abd El-Twab M. Fakhry
mazzensaadd
Mazen Saad
MustafaAmer-1
Mustafa Amer

⚠️ License

Licensed under the GPL-v3 License.