Luna is a GNOME Shell extension that displays the current moon phase directly in your top bar. Using astronomical calculations based on the Julian Date algorithm, Luna provides accurate lunar information without requiring an internet connection.
- Panel Icon - Shows current moon phase with beautiful custom icons
- Detailed Popup with:
- Current phase name
- Next phase
- Illumination percentage
- Distance from Earth (km)
- Lunar age (days)
- Hemisphere Support - Toggle between Northern/Southern hemisphere (icons flip accordingly)
- Works Offline - Uses astronomical formulas, no internet required
- Configurable - Adjustable update interval (15 min - 24 hours)
- Lightweight - Minimal resource usage
Panel icon in top bar
Popup menu with lunar details
Install Luna from extensions.gnome.org.
Make sure you have GNOME Shell integration enabled for your browser.
# Clone the repository
git clone https://github.com/thanderoy/luna.git
cd luna
# Compile the settings schema
glib-compile-schemas luna@thanderoy.github.io/schemas/
# Copy to GNOME extensions directory
cp -r luna@thanderoy.github.io ~/.local/share/gnome-shell/extensions/
# Enable the extension
gnome-extensions enable luna@thanderoy.github.ioRestart GNOME Shell:
- Xorg: Press
Alt+F2, typer, press Enter - Wayland: Log out and log back in
Open extension preferences on your Extensions manager or run:
gnome-extensions prefs luna@thanderoy.github.ioAvailable Settings:
- Hemisphere Selection - Northern or Southern (moon phases appear mirrored in southern hemisphere)
- Update Interval - How often to recalculate moon phase (15 min - 24 hours)
- Verify it's enabled:
gnome-extensions info luna@thanderoy.github.io - Check for errors:
journalctl -f -o cat /usr/bin/gnome-shell | grep Luna - Restart GNOME Shell
Install glib2 development tools:
# Fedora/RHEL
sudo dnf install glib2-devel
# Ubuntu/Debian
sudo apt install libglib2.0-dev-bin
# Arch
sudo pacman -S glib2Luna calculates moon phases using the Julian Date algorithm:
- Converts current date to Julian Date
- Calculates days since a known new moon (Jan 6, 2000)
- Uses the synodic month length (~29.53 days) to determine lunar age
- Maps lunar age to one of 8 phases
- Calculates illumination using cosine approximation
This approach is:
- Accurate - Based on established astronomical formulas
- Offline - No internet connection required
- Fast - Instant calculations, no network latency
Contributions are welcome!
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Test in a GNOME Shell environment
- Commit:
git commit -m 'Add amazing feature' - Push:
git push origin feature/amazing-feature - Open a Pull Request
GNU General Public License v2.0 - see LICENSE
If you like Luna useful, consider supporting development:
Made with ☕ by thanderoy

