{"id":16615175,"url":"https://github.com/0xzer0x/prayer-times","last_synced_at":"2025-03-21T14:31:21.881Z","repository":{"id":193516269,"uuid":"688958246","full_name":"0xzer0x/prayer-times","owner":"0xzer0x","description":"Bash script to manage and display Islamic prayer times with support for Waybar and desktop notifications.","archived":false,"fork":false,"pushed_at":"2025-01-18T16:54:00.000Z","size":464,"stargazers_count":25,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T02:11:54.305Z","etag":null,"topics":["bash","bspwm","dunst","dwm","hyprland","i3","muslim","muslim-prayer-times","polybar","prayer-times","prayertimes","sh","shell-script","sway","waybar","yad"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xzer0x.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-08T13:18:36.000Z","updated_at":"2025-03-04T12:11:19.000Z","dependencies_parsed_at":"2024-04-06T23:24:02.933Z","dependency_job_id":"f298cf01-e0e5-44f5-a897-f839e4ca186d","html_url":"https://github.com/0xzer0x/prayer-times","commit_stats":null,"previous_names":["0xzer0x/statusbar-prayers","0xzer0x/prayer-times"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xzer0x%2Fprayer-times","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xzer0x%2Fprayer-times/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xzer0x%2Fprayer-times/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xzer0x%2Fprayer-times/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xzer0x","download_url":"https://codeload.github.com/0xzer0x/prayer-times/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244815169,"owners_count":20514908,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","bspwm","dunst","dwm","hyprland","i3","muslim","muslim-prayer-times","polybar","prayer-times","prayertimes","sh","shell-script","sway","waybar","yad"],"created_at":"2024-10-12T02:08:49.060Z","updated_at":"2025-03-21T14:31:21.872Z","avatar_url":"https://github.com/0xzer0x.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align='center'\u003e\n\u003ch2\u003e🌙 Prayer Times\u003c/h2\u003e\n\u003cimg alt=\"waybar module\" src=\"screenshots/module.png\"/\u003e\n\u003cbr/\u003e\n\u003cimg alt=\"Yad EN\" src=\"screenshots/yad-en.png\"/\u003e\n\u003cimg alt=\"Yad AR\" src=\"screenshots/yad-ar.png\"/\u003e\n\u003c/div\u003e\n\n\u003e [!WARNING]\n\u003e This script is now deprecated in favor of [go-pray](https://github.com/0xzer0x/go-pray) for offline prayer times calculation, better performance, and less dependencies.\n\nA versatile Bash script designed to manage and display Islamic prayer times. It\nretrieves prayer schedules based on the user's geographical coordinates and\nprovides notifications for each prayer. The script supports multiple languages\nand integrates seamlessly with notification daemons like **dunst** and **mako**.\n\nInspired by [Nofarah Tech](https://www.youtube.com/@NofarahTech)'s prayer times scripts, this version also includes\nadded support for status bars like [Waybar](https://github.com/Alexays/Waybar) and integrated desktop notifications.\n\n### 🚀 Quick Start\n\n1. Clone the repo\n\n```bash\ngit clone https://github.com/0xzer0x/prayer-times.git\n```\n\n2. Run the install script\n\n```bash\ncd prayer-times\n./install.sh\n```\n\n### 📦 Dependencies\n\n- `jq`\n- `at`\n- `yad`\n- `mpv`\n- `curl`\n- `dunst` (x11)\n- `polybar` (x11)\n- `mako` (wayland)\n- `waybar` (wayland)\n- [Nerd Font](https://www.nerdfonts.com/) (recommended)\n\n### 🔧 Procedures\n\n1. Copy files to their corresponding location on your system\n2. Set the parameters for the script\n   - `lat`: latitude (or leave empty to auto fetch `lat` and `long`)\n   - `long`: longitude (or leave empty to auto fetch `lat` and `long`)\n   - `method`: calculation method\n   - `print_lang`: language to print prayer times schedule in (`ar`/`en`)\n   - `notify`: notification daemon (`mako`/`dunst`)\n3. Activate systemd user unit\n4. Add statusbar module\n5. Add notification daemon rule\n6. Configure Yad dialog to show in floating mode\n\n### 🔄 Systemd Unit\n\n- Run one of the following commands to activate the service for your user\n  - `systemctl --user enable --now prayer-times.service # start on boot`\n  - `systemctl --user enable --now prayer-times.timer # start on boot + every 8 hours`\n\n### 🖥️ Statusbar Module\n\n#### Polybar\n\n- Add the following to your [polybar config](https://github.com/polybar/polybar/wiki/Configuration) file (`~/.config/polybar/config[.ini]`) then add the module\n- Modify colors according to your liking (replace #83CAFA)\n\n```ini\n[module/prayers]\ntype = custom/script\nexec = $HOME/.local/bin/prayer-times status\ninterval = 60\nlabel = %{A:$HOME/.local/bin/prayer-times yad:}%{F#83CAFA}󱠧 %{F-} %output%%{A}\n```\n\n#### Waybar (Wayland)\n\n- Add the following custom module to your [waybar config](https://github.com/Alexays/Waybar/wiki/Configuration) (`~/.config/waybar/config`)\n\n```json\n\"custom/prayers\": {\n  \"interval\": 60,\n  \"return-type\": \"json\",\n  \"exec\": \"$HOME/.local/bin/prayer-times waybar\",\n  \"on-click\": \"$HOME/.local/bin/prayer-times yad\",\n  \"format\": \"󱠧  {}\",\n}\n```\n\n- You can style the module using the class of the next prayer (e.g. `Asr`)\n\n### 🔔 Notification Athan\n\n#### Dunst\n\n- Add the following rule to your dunstrc file (`~/.config/dunst/dunstrc`)\n\n```ini\n[play_athan]\nsummary = \"Prayer Times\"\nscript = \"$HOME/.local/bin/toggle-athan\"\n```\n\n#### Mako (Wayland)\n\n- Add the following criteria/rule to mako config (`~/.config/mako/config`)\n\n```ini\n[summary=\"Prayer Times\"]\non-notify=exec $HOME/.local/bin/toggle-athan\non-button-left=exec $HOME/.local/bin/toggle-athan\n```\n\n### 🖼️ Yad Dialog\n\n- Window Title: `Prayers`\n- Configure your window manager to show the Yad window in floating mode and you're all set!\n- Example window rule for [Hyprland](https://hyprland.org/)\n\n```ini\nwindowrulev2 = float,class:(yad)\nwindowrulev2 = move cursor -50% 30,title:(Prayers)\n```\n\n### 📚 References\n\n- Nofarah Tech | نوفرة تك ([video](https://www.youtube.com/watch?v=BnSXo5p1ZLw)) ([dotfiles](https://github.com/HishamAHai/dotfiles/tree/main/.local/bin))\n- [Aladhan API](https://aladhan.com/prayer-times-api#GetTimings)\n- [Polybar config](https://github.com/polybar/polybar/wiki/Module:-script)\n- [Default dunstrc](https://github.com/dunst-project/dunst/blob/master/dunstrc)\n- [Mako man page](https://github.com/emersion/mako/blob/master/doc/mako.5.scd)\n- [Waybar Custom Module](https://github.com/Alexays/Waybar/wiki/Module:-Custom)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xzer0x%2Fprayer-times","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xzer0x%2Fprayer-times","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xzer0x%2Fprayer-times/lists"}