Jalali (Persian/Solar Hijri) calendar module for Waybar with holiday detection, Nowruz countdown, and monthly calendar grid
Project description
waybar-jalali-calendar
Jalali (Persian/Solar Hijri) calendar module for Waybar.
Works on Sway, Hyprland, and any Wayland compositor using Waybar.
✨ Features
- Jalali date in the bar with full Persian text (e.g.,
۱۶ خرداد ۱۴۰۵) - Calendar grid in tooltip showing the full month with today highlighted
- Holiday detection — both fixed Jalali holidays (Nowruz, 22 Bahman, etc.) and movable Hijri holidays (Ashura, Ramadan, Eid)
- Nowruz countdown — shows days remaining until the Persian New Year
- Year-end countdown — remaining days in the current year
- Gregorian & Hijri dates in tooltip
- Click navigation — scroll through months in the tooltip via scroll wheel; click to reset
- Weekend styling — Friday (جمعه) gets a special CSS class
- Persian numerals — numbers displayed in Arabic-Indic digits (۰-۹)
⚡ Quick Start
pip install waybar-jalali-calendar
Then add to your Waybar config (see Configuration below).
📦 Installation Options
Using pip (recommended)
pip install waybar-jalali-calendar
From source
git clone https://github.com/sunba91-su/waybar-jalali-calendar.git
cd waybar-jalali-calendar
pip install .
Using pipx (isolated)
git clone https://github.com/sunba91-su/waybar-jalali-calendar.git
cd waybar-jalali-calendar
pipx install .
Using Makefile
make install # user install
# or
make install-system # system-wide
Arch Linux (AUR)
# Coming soon — or build from dist/arch/PKGBUILD
🎨 Waybar Configuration
config (~/.config/waybar/config)
"custom/shamsi-date": {
"exec": "waybar-jalali-calendar",
"format": "{}",
"interval": 3600,
"return-type": "json",
"signal": 1,
"on-click": "waybar-jalali-calendar --reset && pkill -SIGRTMIN+1 waybar",
"on-scroll-up": "waybar-jalali-calendar --next && pkill -SIGRTMIN+1 waybar",
"on-scroll-down": "waybar-jalali-calendar --prev && pkill -SIGRTMIN+1 waybar"
}
style (~/.config/waybar/style.css)
#custom-shamsi-date {
font-weight: bold;
padding: 0 8px;
margin: 2px 0;
border-radius: 4px;
}
#custom-shamsi-date.holiday {
color: #bf616a; /* red for holidays */
}
#custom-shamsi-date.weekend {
color: #ebcb8b; /* yellow for Friday (Jomeh) */
}
Restart Waybar:
pkill waybar && waybar &
# or, if signals are configured:
pkill -SIGRTMIN+1 waybar
🕹 Usage
Once installed and configured, the calendar appears in your Waybar:
- Bar text:
۱۶ خرداد ۱۴۰۵(current date with Persian digits) — shows a🎉icon on holidays - Tooltip (hover): Full date info, Hijri date, Nowruz countdown, and a monthly calendar grid with today highlighted
- Scroll up/down: Navigate through months in the tooltip
- Click: Reset back to the current month
CLI Commands
waybar-jalali-calendar # Output Waybar JSON (called by Waybar)
waybar-jalali-calendar --reset # Reset to current month
waybar-jalali-calendar --next # Show next month
waybar-jalali-calendar --prev # Show previous month
📅 Holiday Coverage
Fixed Jalali Holidays
- Nowruz (1–4 Farvardin)
- Islamic Republic Day (12 Farvardin)
- Sizdah Bedar (13 Farvardin)
- Death of Khomeini (14 Khordad)
- 15 Khordad Uprising (15 Khordad)
- Islamic Revolution Victory (22 Bahman)
- Nationalization of Oil (29 Esfand)
Hijri (Lunar) Holidays
- Tasua (9 Muharram)
- Ashura (10 Muharram)
- Arba'een (20 Safar)
- Death of Prophet (28 Safar)
- Martyrdom of Imam Reza (30 Safar)
- Mab'ath (27 Rajab)
- Birth of Imam Mahdi (15 Sha'ban)
- Ramadan (1 Ramadan)
- Eid al-Fitr (1–2 Shawwal)
- Eid al-Adha (10 Dhu al-Hijjah)
- Eid al-Ghadir (18 Dhu al-Hijjah)
🛠 Development
git clone https://github.com/sunba91-su/waybar-jalali-calendar.git
cd waybar-jalali-calendar
pip install -e ".[test]"
python -m pytest tests/ -v --cov
📝 Uninstall
pip uninstall waybar-jalali-calendar
rm -f ${XDG_RUNTIME_DIR:-/tmp}/waybar-jalaly-state # clean up state file
📄 License
GNU General Public License v3.0 or later. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file waybar_jalali_calendar-1.2.1.tar.gz.
File metadata
- Download URL: waybar_jalali_calendar-1.2.1.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b93ba3192c38e66e2f6a5324e3586bb7004828ec608fb527959ca195a72779a
|
|
| MD5 |
7821706a06de313886dded2831a7cdba
|
|
| BLAKE2b-256 |
06898df00308806318d31e870c4a58546a6bcb2c4b34c5c510a1314def7dc373
|
File details
Details for the file waybar_jalali_calendar-1.2.1-py3-none-any.whl.
File metadata
- Download URL: waybar_jalali_calendar-1.2.1-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
523c455338587892dbcbeb8b5df62871fa501f0b1658ed6cc2b073b0045a76d1
|
|
| MD5 |
d781917e3f89c1049fb656689616c96f
|
|
| BLAKE2b-256 |
34ed00f772cb7a4c099f5e2f9e155b9ae230c2f89207e4051fff7328a66a7150
|