Executable: bikram-calendar
A desktop widget and calendar application for Bikram Sambat, built with the modern Qt 6 framework. It uses a native C++ backend for efficient system tasks.
-
Desktop Widget & Calendar: Provides a convenient, always-on desktop widget. Clicking the widget opens a full-featured calendar window.
-
Date Calculation & Panchanga Details:
- The calendar uses a hybrid system for date calculation:
- Pre-computed Data: For the 90-year period from 2000 Baisakh to 2089 Chaitra, the calendar uses pre-computed data for high accuracy. A small notification appears in the app when you are viewing dates outside of this primary range.
- Algorithmic Calculation: For dates outside this range, it dynamically computes them based on traditional Surya Siddanta calculation logic.
- Daily Panchanga Information:
- The main calendar view displays the Tithi for each day.
- Clicking on a specific day reveals comprehensive details including the Tithi, Nakshatra, Yoga, and Karana. It also shows debug information like the sun and moon's positions.
Disclaimer on Accuracy: As the Surya Siddanta is an observational calendar, calculated timings can differ by minutes to hours compared to other sources. While every effort has been made to ensure accuracy, the data may contain mistakes. For official or ceremonial purposes, please always consult a calendar approved by the Nepal Panchanga Nirnayak Samiti (नेपाल पञ्चाङ्ग निर्णायक समिति).
- The calendar uses a hybrid system for date calculation:
-
Customization & Themes:
- The calendar window includes an easy-to-use switch for toggling between Light and Dark themes. Your preference is saved and restored on the next launch.
- Right-click the widget to open a context menu where you can configure font sizes and colors.
-
State Persistence:
- The application remembers and restores the position of the widget and the calendar window.
- The size of the calendar window is also saved and restored automatically.
- (See Wayland Limitations below for exceptions).
-
System Integration:
- Uses an internal Qt C++ backend for handling system tasks like printing, managing autostart, and displaying helpful tooltips.
- Framework: Built entirely on the Qt 6 framework.
- Required Version: Requires Qt 6.0 or higher. It has been well-tested on version Qt 6.8.0 and Qt 6.9
- Legacy Support: Please note that Qt 5 is not supported.
Due to the security design and protocols of the Wayland display server, some features behave differently:
-
Window Position: The application cannot query window coordinates on Wayland, so it cannot save or restore the position of the widget or calendar window. However, the window size is saved and restored correctly.
-
Widget Click Action: On Wayland, a click on the movable widget is interpreted by the compositor as a "drag/move" action, which prevents the click from being registered by the application.
- Workaround: To open the calendar on Wayland, right-click the widget and select the "Open Calendar" button from the context menu.
This guide provides instructions for compiling the project on popular Linux distributions.
You must first install the necessary build tools and libraries for your specific operating system.
First, update your package list, then install the essential build tools and Qt 6 development packages.
sudo apt update
sudo apt install build-essential \
qt6-base-dev \
qt6-declarative-dev \
qt6-declarative-dev-tools \
qt6-tools-dev \
qt6-tools-dev-tools \
qt6-shadertools-dev \
libqt6printsupport6 \
qml6-module-qtquick-controls \
qml6-module-qtquick-layouts \
qml6-module-qtquick-window \
qml6-module-qtcore
sudo apt update
sudo apt install libqt6core6 \
libqt6gui6 \
libqt6qml6 \
libqt6quick6 \
libqt6printsupport6 \
qml6-module-qtquick-controls \
qml6-module-qtquick-controls2 \
qml6-module-qtquick-layouts \
qml6-module-qtquick-window
Ensure your system is up-to-date. Install the base-devel group (if you haven't already) and the required Qt 6 packages.
sudo pacman -Syu
# Install build-time dependencies
sudo pacman -S base-devel qt6-base qt6-declarative qt6-shadertools qt6-tools
sudo pacman -S qt6-base qt6-declarativeNote: If you encounter build errors, double-check that all the listed dependencies have been installed successfully.
- runtime dependencies should install with build dependencies. if downloaded prebuilt binary install runtime libraries only.
Once the dependencies are installed, you can compile the project using one of the following methods.
This is the most straightforward method for building the project.
-
Open the
.profile in Qt Creator. -
Configure the project kit if prompted.
-
Click the Build button (or press
Ctrl+B) and then the Run button (or pressCtrl+R).
-
Navigate to the project's root directory.
-
Create and enter a build directory:
mkdir build && cd build
-
Generate the Makefile using
qmake6.# Note: On some older systems, you might need to use 'qmake' instead of 'qmake6'. qmake6 .. -
Compile the source code:
make
-
The compiled executable will be located in the
builddirectory.
-
Navigate to the project's root directory.
-
Create and enter a build directory:
mkdir build && cd build
-
Generate the build files with CMake:
cmake ..
-
Compile the source code:
make
-
The compiled executable will be located in the
builddirectory.
Contributions are welcome! If you have a suggestion or want to report a bug, please feel free to open an issue.
If you would like to contribute code, please follow these steps:
-
Fork the repository.
-
Create a new branch (
git checkout -b feature/your-feature-name). -
Make your changes and commit them (
git commit -m 'Add some feature'). -
Push to the branch (
git push origin feature/your-feature-name). -
Open a Pull Request.
This project is licensed under the GNU General Public License v3.0 or later. See the LICENSE file for more details.