Skip to main content

Overview

The --status (or -s) flag provides a single-line output showing the next upcoming prayer event with a countdown. This mode is perfect for status bars, coding agents, and minimal displays.

Basic Usage

Example Output:
Status mode is completely non-interactive and silent on failure. It’s designed to never interrupt your workflow.

Output Format

The status line shows the next prayer event with time remaining:

Possible Event Labels

Countdown Format

Hours and Minutes

When more than 1 hour remains

Minutes Only

When less than 1 hour remains

Final Minutes

When very close to the event

Status Bar Integration

tmux

Add Ramadan timings to your tmux status bar:
Set status-interval to 60 seconds to update the countdown every minute.

Polybar

Integrate with Polybar status bar:

i3status

Add to i3status configuration:

Waybar

For Wayland users with Waybar:

Terminal Integration

Shell Prompt (PS1)

Add to your shell prompt:
Shell prompts execute on every command. Consider caching to avoid repeated CLI calls:

Coding Agent Integration

VS Code Status Bar

Create a VS Code extension:

JetBrains IDEs

For IntelliJ, PyCharm, WebStorm, etc.:

Neovim/Vim Statusline

Location Override

Use --city to query a different location in status mode:
One-off city queries don’t overwrite your saved default location.

Error Handling

Silent Failure Behavior

Status mode fails silently by design:
This prevents error messages from cluttering your status bar.

Fallback Display

Provide a fallback for when status mode fails:

Performance Optimization

Caching Strategy

Since countdowns change every minute, cache for 60 seconds:

Background Updates

Use a background process to keep the cache warm:

Complete Examples

Minimal tmux Setup

Polybar with Tooltip

Shell Script Widget

Testing

1

Test Basic Output

Should output a single line with no errors.
2

Test with Location

3

Test Error Handling

4

Test in Status Bar

Add to your status bar config and reload:

Troubleshooting

  • Check if ramadan-cli is installed: which ramadan-cli
  • Test manually: ramadan-cli -s
  • Check exit code: ramadan-cli -s; echo $?
  • Verify PATH in status bar environment
The status line is designed to be concise. Maximum length is around 20-30 characters:
If truncated, adjust your status bar width settings.
  • Check refresh interval in your status bar config
  • Verify the CLI is being called each time
  • Try clearing any caches: rm /tmp/ramadan-*
Configure timezone explicitly:
Then test:

Best Practices

Cache Aggressively

Update every 60 seconds, not on every display refresh

Handle Failures

Always provide a fallback display value

Suppress Errors

Redirect stderr to /dev/null in status bars

Keep It Simple

Status line is for quick glances, not detailed info

See Also

JSON Output

Structured output for advanced integrations

Agent Usage

Using ramadan-cli in automated workflows