Skip to content

Conversation

@mianmuneebajaz
Copy link
Contributor

@mianmuneebajaz mianmuneebajaz commented Nov 26, 2025

Description

This PR adds a new script command called "Prayer Summary".
It allows a user to instantly view Islamic prayer times for their location directly in Raycast's menu bar.

The command shows:

  • The current prayer period (which prayer has most recently started)
  • The next upcoming prayer with its time and a countdown

Key features:

  • Auto-refreshes every 2 minutes to keep the countdown accurate
  • Color-coded output: current prayer in green, countdown in yellow when under 10 minutes
  • Times displayed in 12-hour AM/PM format for readability
  • Handles edge cases like after Isha (shows "Fajr tomorrow" as next prayer)
  • Uses the Aladhan API with configurable city, country, and calculation method

Type of change

  • New script command

Screenshot

image

Dependencies / Requirements

  • Update your city, country in the script for accurate results

Checklist

Copy link
Contributor

@unnamedd unnamedd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mianmuneebajaz, thanks for your contribution to our repository.

When I was reviewing it, I realized that perhaps you do not want to have it as a Script Command but as an Extension, and there are a few reasons for that. In the end, I have a feeling you are going to agree with me.

Few Cons for Script Command

  1. Script Commands are not an easy thing to install; it demands some knowledge.
  2. Your Script Command requires a few extra tools to be installed in order to make it work properly, and again, forcing the user to install them themselves.
  3. Making it a template will require your user to change some configurations before use.
  4. It will run in the root search of Raycast.

Few Pros for Extension

  1. Easier to install and distribute
  2. You will have far more tools to help in the request and information parsing (where you are currently using jq for that)
  3. Easier way to configure it
  4. It can run directly in the macOS menu bar, making it visible 100% of the time if the user prefers
  5. A huge documentation and examples of how to create an extension yourself.

With all that being said, I guess it would be amazing to have it as an Extension.

What do you think?

@mianmuneebajaz
Copy link
Contributor Author

Hi @unnamedd, thank you for the detailed review and suggestions!

I've made all the requested changes:

  • Renamed the file to prayer-summary.template.sh with empty CITY and COUNTRY variables
  • Added author information (@raycast.author and @raycast.authorURL)
  • Added dependency documentation for jq at the top with installation instructions (curl comes pre-installed on macOS)
  • Added "How to use this script?" section with setup instructions
  • Added detailed Configuration section with numbered steps and common calculation methods
  • Organized the code following the repository's conventions

Regarding the Extension suggestion:
I completely understand and appreciate the benefits of Extensions - easier installation, better tooling, menu bar support, and a smoother user experience overall. Those are compelling reasons!

However, I'd like to note that this Script Command is intended as an improved, configurable version of the existing commands/culture/prayer-times.sh that's already in the repository. The key differences from that command are:

  1. Configurable/Template - The existing prayer-times.sh has hardcoded city/country values, while this version allows users to configure their own location
  2. Contextual information - The existing command simply displays all prayer times, whereas this one provides dynamic context: which prayer is currently active, which is upcoming, and a countdown timer
  3. Cleaner output - Shows "Current: Isha | Next: Fajr (tomorrow) at 05:30 AM in 6h 45m" instead of listing all times

Since we already have a prayer times script command in the repo, I thought this would be a nice addition as an alternative variant.

Copy link
Contributor

@unnamedd unnamedd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks awesome to me! Thanks a lot!

The idea of implementing it as an extension is just an idea, would be very amazing if you could make it with different UI components, more configurable, but again, it is completely up to you. It is very very funny writing extensions for Raycast.

Copy link
Contributor

@nhojb nhojb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for the contribution!

@nhojb nhojb merged commit 17f5e3d into raycast:master Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants