indicator-lunar-calendar
An application indicator for Unity that displays the current date and time in lunar calendar.
Copyright (c) 2016-2019 Adrian I Lam spam@adrianiainlam.tk s/spam/me/
Not to be confused with indicator-lunar, which shows attributes and ephemerides for astronomical objects.
Screenshots
Normal appearance of the indicator
Menu of the indicator, shown on click
Indicator showing solar term information
Note: The conversion is calculated using timezone UTC+8 (HKT), while the clock shown above is using timezone UTC+1.
Dependencies
-
Python 3
-
LunarCalendarPy (included as submodule here)
Translated from the JavaScript LunarCalendar library by GitHub user @zzyss86.
-
Used for periodic update of the indicator.
-
Detects suspends/hibernates which would cause incorrect timings used by schedule.
This indicator used to be written in JavaScript (node.js) using the node-gtk package, but it was eventually abandoned, got replaced, the replacement was abandoned, etc. The situation was a bit too messy for me so I decided to just rewrite the whole thing in Python, which would also make installation easier for most standard Ubuntus, and would use less RAM.
Usage
- Install schedule and dbus-python (
pip install schedule dbus-python
). - Clone this repository (
git clone --recurse-submodules git://adrianiainlam.tk/indicator-lunar-calendar.git
). - Add the script as a startup application.
- Run the script manually for the first time. (Alternatively, log out and log in again.)
- The indicator should be shown at the top right corner, having an icon that shows the year and a label that shows the month and date.
- Clicking on the indicator should result in a menu with more detailed information including the time.
License
This program is released under the MIT License. For the full text of this license, please refer to the file "indicator-lunar-calendar.py".