Islamic Prayer Timings daemon for Linux

Islamic Prayer Timings for Linux

Requirements & Features Find an API to get the correct timings for your country and city. Read values of country, city, hour24 and onAdhan from ~/.config/IslamicPrayerTimings. This is configuration file example: { "country": "Egypt", "city": "Cairo", "hour24": false, "onAdhan": "~/.config/IslamicPrayerTimings/inAdhan.sh" } Get and store the timings and hijri date. Make a cache contains the latest response in case starting the daemon without internet. Make a daemon that calculates the next pray timing, time difference and starts a timer with the countdown. When the timer is finished send a notification and a user shell script is run (optional) e.g. lock the screen, play a sound, …. This is example of such a script: #!/bin/bash # play adhan audio AUDIO_FILE="/home/abdalrahman/adhan_mansour_al_zahrani.mp3" mpv --no-video --loop=no --really-quiet "$AUDIO_FILE" & sleep 10 # lock screen (for hyprland) hyprlock Development Best practice is to use bash script, but I’ll use C++ as my knowledge of bash is very basic yet. Dependencies: g++ : C++ compiler CMake : building tool for C++ nlohmann-json : to parse json files for read curl : to send http get request to retrieve the timings from the API libnotify : for sending notification to a notification daemon mako (Any suitable notification server) : notification daemon to receive and show notification The API I’ll retrieve the timings from is : https://api.aladhan.com/v1/timingsByCity?city=Cairo&country=Egypt test the response using postman Response is JSON, I need to send a GET request with curl to retrieve that response. AI tools like ChatGPT will be very useful to give examples and explains how to use curl.h and json.hpp, generally saving time of reading documentation. Rest of the logic is simple Waybar custom module You can see the wiki to know to add a custom module to Waybar. I want to show the next prayer timing name and a countdown timer. With tooltip on hover with the day prayer timings. ...

July 6, 2025 · 2 min · 321 words · Abdalrahman Shaban
Arch Linux cover

Arch Linux with Hyprland | Comprehensive guide

Start with the programs You should begin with the programs you’re willing to use, then choose the suitable hardware with your targeted OS in mind. Examples: The free version of Davinci Resolve on Linux doesn’t support H264 codec unlike Windows, but supports AV1, so you need a graphic card with AV1 encoder or to buy the paid version of Davinci Resolve. If you’ll use Blender then, you should buy some Nvidia GPU as CUDA is very supported on Blender. Blender and CUDA works very well on both Linux and Windows. Running LLMs locally, VRAM will be very important, Apple’s unified memory may be very useful. Adobe programs, Microsoft Office, Valorant, … Not working on Linux but very supported on Windows. Have a program or two to run on Windows? Very simple, dual-boot. ...

June 24, 2025 · 9 min · 1769 words · Abdalrahman Shaban