waybar-jalaly-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-jalaly-calendar
Then add to your Waybar config (see Configuration below).
📦 Installation Options
Using pip (recommended)
pip install waybar-jalaly-calendar
From source
git clone https://github.com/sunba91-su/waybar-jalali-calendar.git
cd waybar-jalaly-calendar
pip install .
Using pipx (isolated)
git clone https://github.com/sunba91-su/waybar-jalali-calendar.git
cd waybar-jalaly-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-jalaly-calendar",
"format": "{}",
"interval": 3600,
"return-type": "json",
"signal": 1,
"on-click": "waybar-jalaly-calendar --reset && pkill -SIGRTMIN+1 waybar",
"on-scroll-up": "waybar-jalaly-calendar --next && pkill -SIGRTMIN+1 waybar",
"on-scroll-down": "waybar-jalaly-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-jalaly-calendar # Output Waybar JSON (called by Waybar)
waybar-jalaly-calendar --reset # Reset to current month
waybar-jalaly-calendar --next # Show next month
waybar-jalaly-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-jalaly-calendar
pip install -e ".[test]"
python -m pytest tests/ -v --cov
📝 Uninstall
pip uninstall waybar-jalaly-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.
Metadata
Release files for waybar-jalaly-calendar 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| waybar_jalaly_calendar-1.2.0.tar.gz | 10.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| waybar_jalaly_calendar-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.3 kB
Release files / waybar_jalaly_calendar-1.2.0.tar.gz
| Download URL | waybar_jalaly_calendar-1.2.0.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ae6bf7a5cf1e3bc5699a8c9e6a481bf761285d3eecbb3ed43b8188f97a032d8
|
|
BLAKE2b-256 checksum How to use checksums |
fae2d1b74fd05911bf95788426cf0b90a3c03af719251123a53013afd6ff0c05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / waybar_jalaly_calendar-1.2.0-py3-none-any.whl
| Download URL | waybar_jalaly_calendar-1.2.0-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26a241e9243c49c85a30a56c2756f890dcb10e6050f0e9bde7439cdbfe391fa7
|
|
BLAKE2b-256 checksum How to use checksums |
cdaf7e0e1cf799fb41833a32a172da7a409d8c13c6774ee4dab07bc75f8de737
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|