Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Bash script to manage and display Islamic prayer times with support for Waybar and desktop notifications.

License

NotificationsYou must be signed in to change notification settings

0xzer0x/prayer-times

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Warning

This script is now deprecated in favor ofgo-pray for offline prayer times calculation, better performance, and less dependencies.

A versatile Bash script designed to manage and display Islamic prayer times. Itretrieves prayer schedules based on the user's geographical coordinates andprovides notifications for each prayer. The script supports multiple languagesand integrates seamlessly with notification daemons likedunst andmako.

Inspired byNofarah Tech's prayer times scripts, this version also includesadded support for status bars likeWaybar and integrated desktop notifications.

🚀 Quick Start

  1. Clone the repo
git clone https://github.com/0xzer0x/prayer-times.git
  1. Run the install script
cd prayer-times./install.sh

📦 Dependencies

  • jq
  • at
  • yad
  • mpv
  • curl
  • dunst (x11)
  • polybar (x11)
  • mako (wayland)
  • waybar (wayland)
  • Nerd Font (recommended)

🔧 Procedures

  1. Copy files to their corresponding location on your system
  2. Set the parameters for the script
    • lat: latitude (or leave empty to auto fetchlat andlong)
    • long: longitude (or leave empty to auto fetchlat andlong)
    • method: calculation method
    • print_lang: language to print prayer times schedule in (ar/en)
    • notify: notification daemon (mako/dunst)
  3. Activate systemd user unit
  4. Add statusbar module
  5. Add notification daemon rule
  6. Configure Yad dialog to show in floating mode

🔄 Systemd Unit

  • Run one of the following commands to activate the service for your user
    • systemctl --user enable --now prayer-times.service # start on boot
    • systemctl --user enable --now prayer-times.timer # start on boot + every 8 hours

🖥️ Statusbar Module

Polybar

  • Add the following to yourpolybar config file (~/.config/polybar/config[.ini]) then add the module
  • Modify colors according to your liking (replace #83CAFA)
[module/prayers]type = custom/scriptexec = $HOME/.local/bin/prayer-times statusinterval = 60label = %{A:$HOME/.local/bin/prayer-times yad:}%{F#83CAFA}󱠧 %{F-} %output%%{A}

Waybar (Wayland)

  • Add the following custom module to yourwaybar config (~/.config/waybar/config)
"custom/prayers": {"interval":60,"return-type":"json","exec":"$HOME/.local/bin/prayer-times waybar","on-click":"$HOME/.local/bin/prayer-times yad","format":"󱠧  {}",}
  • You can style the module using the class of the next prayer (e.g.Asr)

🔔 Notification Athan

Dunst

  • Add the following rule to your dunstrc file (~/.config/dunst/dunstrc)
[play_athan]summary ="Prayer Times"script ="$HOME/.local/bin/toggle-athan"

Mako (Wayland)

  • Add the following criteria/rule to mako config (~/.config/mako/config)
[summary="Prayer Times"]on-notify=exec $HOME/.local/bin/toggle-athanon-button-left=exec $HOME/.local/bin/toggle-athan

🖼️ Yad Dialog

  • Window Title:Prayers
  • Configure your window manager to show the Yad window in floating mode and you're all set!
  • Example window rule forHyprland
windowrulev2 = float,class:(yad)windowrulev2 = move cursor -50% 30,title:(Prayers)

📚 References

About

Bash script to manage and display Islamic prayer times with support for Waybar and desktop notifications.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp