Alexays / Waybar

Highly customizable Wayland bar for Sway and Wlroots based compositors. :v: :tada:
MIT License
5.83k stars 657 forks source link

clock module: Support for other calendars e.g. Hijri, Chinese ... #2260

Open zefr0x opened 1 year ago

zefr0x commented 1 year ago

As what some people know, English is not the only language in the world, and USA is not the only country in the world.

The Gregorian calendar is also not the only calendar in the world. Of course some of them are historical and no one use them, but some of them are used officially in some countries like the Hijri (Islamic), Chinese, Japanese (just the era name), Hebrew and the Julian calendar.

I know that I can use a custom module, but I think it should be easy to implement since we have the date C++ library which is based on the \<chrono> header. (I'm not great in C++ and I haven't search a lot, so there might be a better library or some problems)

Personally I am interested in the Hijri calendar since I use it a lot, and I am working in a custom module to have it for now.

mattfbacon commented 10 months ago

Also, why is Sunday first? Any way to change to Monday?

manio commented 1 week ago

Also, why is Sunday first? Any way to change to Monday?

I'd also like to change this. The function for this is probably here: https://github.com/Alexays/Waybar/blob/ccc3c132124623bde5127937fe4fc9aa45a9d35d/src/modules/clock.cpp#L465

Any way to change/configure this hardcoded Sunday value?

mattfbacon commented 1 week ago

fwiw I switched to using cal -m directly. https://github.com/mattfbacon/dotfiles/blob/88ffd825eba12406e0ce43be24edf3dffa47142b/framework/sway/.config/waybar/clock.py