Skip to content

Repository files navigation

☀️ Animated Weather Desklet for Cinnamon

A beautiful, real-time animated weather desklet for Linux Mint Cinnamon desktop. Features live particle effects (rain, snow, hail, drifting clouds, twinkling stars, lightning), glassmorphism UI, rounded corners, daily & hourly forecast, auto-detection of your location, and full Russian language support. Now with dual weather API providers — switch between MET Norway (yr.no) and Open-Meteo.

Animated Weather Desklet

✨ Features

  • Live animated weather — rain drops, snowflakes, hail stones, drifting clouds, twinkling stars, lightning flashes, rainbow
  • Rounded corners — 24px radius with Cairo clipping for a modern glass-morph look
  • Dual weather providers — MET Norway (yr.no) works in regions where Open-Meteo is blocked; Open-Meteo automatically falls back to MET Norway on network/API failures
  • Ambient light integration — snow, rain, and hail particles pick up sky tones for natural scene blending
  • Daily forecast (3–5 days) — day name, weather icon, hi/lo temperatures
  • Hourly forecast — 6/12/24 hour forecast strip, 8 slots (switchable via settings)
  • Transparent background mode — toggle off the sky gradient and glass panel for a clean, floating look. Unlike other desklets, no visible container borders or backgrounds
  • Glassmorphism UI — frosted glass panel with adaptive transparency
  • Sky gradient — dynamic sky colours that adapt to weather condition and time of day
  • Auto location — detects your city via IP geolocation (or set manually)
  • Real-time data — powered by MET Norway (yr.no) or Open-Meteo with automatic MET Norway fallback (free, no API key required)
  • 6 colour themes — Auto, Glass, Dark, Warm, Cool, Nature
  • Configurable — units, theme, opacity, background toggle, width, refresh interval, forecast mode, weather provider
  • 🌐 Russian language — interface and settings available in Русский
  • Lightweight — ~30fps Cairo-rendered, no GPU needed
  • No API key required — both MET Norway (yr.no) and Open-Meteo are free, no registration needed

📦 Installation

Prerequisites

  • Linux Mint 20+ (or any Cinnamon desktop ≥ 4.6)
  • Internet connection (for weather data)

Quick Install

Choose any method:

# 🥇 Recommended — Makefile (clone once, keeps git for easy updates)
git clone https://github.com/Zulus-Code/cinnamon-animated-weather-desklet.git
cd cinnamon-animated-weather-desklet
make install

# 🥈 Alternative — install.sh (same git + local copy)
./install.sh

# 🚀 One-liner (no clone, no git — just works)
curl -sL https://raw.githubusercontent.com/Zulus-Code/\
cinnamon-animated-weather-desklet/master/install.sh | bash

After any method → restart Cinnamon: Ctrl+Alt+Esc

Activate

  1. Right-click on desktop → Add Desklet
  2. Find Анимированная погода (or Animated Weather) → click Add
  3. Right-click the desklet → Configure
  4. Choose your city (or leave auto)
  5. Select Language → Русский (optional)

That's it — no API key needed. Works out of the box.

Uninstall

# From the repo directory (if you cloned it)
make uninstall

# Or using install.sh
./install.sh --uninstall

Updating

cd ~/.local/share/cinnamon/desklets/weather-animated@zulus/
git pull
make reinstall   # or: ./install.sh
Ctrl+Alt+Esc

🌐 Internationalisation

The desklet supports English and Russian interface languages.

For the Cairo-rendered UI (temperatures, labels, errors): Switch language in desklet settings: Configure → Language → Русский

For the settings dialog (descriptions, tooltips): Install gettext and compile the translations:

sudo apt install gettext
msgfmt ~/.local/share/cinnamon/desklets/weather-animated@zulus/po/ru.po \
  -o ~/.local/share/locale/ru/LC_MESSAGES/weather-animated@zulus.mo
Ctrl+Alt+Esc

When switching to Russian:

  • Wind unit changes from km/h to м/с
  • Pressure unit changes from hPa to гПа
  • All labels, errors, and loading messages are translated
  • Settings dialog descriptions and tooltips are translated (with msgfmt)

⚙️ Configuration

Setting Default Description
Location auto City name, lat,lon coordinates, or auto for IP geolocation
Provider MET Norway Weather source: MET Norway (yr.no) or Open-Meteo
Units Celsius °C or °F
Language English Interface language (English / Русский)
Refresh 10 min How often to fetch weather data
Theme Auto Auto, Glass, Dark, Warm, Cool, Nature
Forecast ✅ On Show forecast strip
Forecast mode Daily Daily (3–5 days) or Hourly (up to 24h)
Forecast hours 6 h Hourly forecast range (3–24 h)
Background ✅ On Show sky gradient and glass panel (off = transparent, particles only)
Humidity ✅ On Show humidity
Wind ✅ On Show wind speed
Pressure ✅ On Show atmospheric pressure
Opacity 70% Panel transparency
Width 350 px Desklet width

🎨 Weather Animations

Condition Effects
☀️ Clear (day) Warm golden glow, subtle sparkles
🌙 Clear (night) Deep blue sky, twinkling stars with cross flares
☁️ Cloudy Grey-white gradient, drifting cloud clusters
🌧️ Rain Dynamic rain streaks, steel-blue sky
⛈️ Thunderstorm Heavy rain, dark turbulent sky, lightning flashes
🧊 Hail Icy ball particles with white highlights (WMO 96/99)
🌈 Rainbow Arc in lower-left when sun is low + light rain
❄️ Snow White gradient, falling snowflakes with drift
🌫️ Fog/Mist Soft grey gradient, fog wisps

🛠️ Development

The desklet is split into logical modules for maintainability:

weather-animated@zulus/
├── desklet.js           # Main class — wires modules together, settings, lifecycle
├── constants.js         # Colors, WMO weather codes, i18n strings, emoji map
├── weatherService.js    # MET Norway/Open-Meteo API, geocoding, forecast builder (daily + hourly)
├── renderer.js          # Cairo/PangoCairo rendering — sky, glass panel, text, forecast, particles
├── particleSystem.js    # Particle physics — rain, snow, hail, clouds, stars
├── sceneBuilder.js      # Procedural sky builder — Perlin noise, fBm, cloud/fog/lighting
├── utils.js             # Helpers — text width, local date parsing, day names
├── settings-schema.json # Settings UI definition
├── metadata.json        # Desklet metadata
├── stylesheet.css       # Container styles
├── eslint.config.mjs    # ESLint flat config (GJS/Cinnamon)
├── install.sh           # Legacy installer
├── tests/               # 119 unit tests for core logic
│   ├── run.js
│   ├── utils.test.js
│   ├── constants.test.js
│   ├── sceneBuilder.test.js
│   ├── renderer.test.js
│   └── weatherService.test.js
├── po/
│   ├── weather-animated@zulus.pot
│   └── ru.po
├── README.md
└── LICENSE

Module roles

Module Lines Responsibility
desklet.js ~315 Desklet class, settings binding, lifecycle, animation loop, container transparency
constants.js ~128 Sky/palette colors, WMO→description dict (en/ru), emoji mapping, i18n strings
weatherService.js ~676 Open-Meteo + MET Norway API, geocoding (Open-Meteo + ip-api.com), Open-Meteo→MET fallback, altitude-aware MET requests, WMO→OWM ID mapping, symbol→WMO mapping, daily/hourly forecast builder
renderer.js ~1030 All drawing: sky gradient, glass panel, current weather UI, daily/hourly forecast, loading/error states
particleSystem.js ~520 Particle classes, physics update, per-condition particle spawning (rain, snow, hail, clouds, stars)
sceneBuilder.js ~750 Scene generation from weather codes, Perlin noise/fBm textures for clouds & fog, sky colour interpolation
utils.js ~65 _pangoWidth(), _parseLocalDate(), _getMinutes(), _dayName(), _hexToRgba(), wmoToOwmId()

Code quality

  • ESLint — flat config for GJS, all JS files 0 errors, 0 warnings
  • JSDoc — full @param/@returns annotations on all functions/methods across all modules
  • Tests — 122 unit tests for utils, constants, sceneBuilder, renderer, weatherService (run with node tests/run.js)

Architecture

  • Class-based ES6 JavaScript (Cinnamon/GJS compatible)
  • Cairo + PangoCairo rendering — all UI drawn via Cairo on St.DrawingArea, text through PangoCairo for emoji support
  • Particle system — lightweight physics for rain/snow/hail/clouds/stars in a dedicated module
  • Procedural scene — Perlin noise / fBm textures for realistic clouds and fog layers
  • HTTP — libsoup2 (queue_message) / libsoup3 (send_and_read_async) / blocking curl fallback, encapsulated in weatherService.js
  • i18n — custom STRINGS dict + _(key) helper in constants.js; Gettext .po files for settings dialog
  • Weather API — MET Norway (default) and Open-Meteo. Both are free, no API key. If Open-Meteo forecast is unreachable, the desklet automatically falls back to MET Norway. Uses WMO weather codes mapped to OWM-compatible IDs for rendering compatibility. Provider switchable in desklet settings
  • Geocoding — Open-Meteo Geocoding API for city search, ip-api.com for auto-location. Manual lat,lon input is used directly; city search requests multiple candidates and uses returned elevation for altitude-aware MET Norway forecasts
  • No dependencies — pure JavaScript, no Node.js, no WebKit

📄 License

GNU General Public License v3.0 — see LICENSE.


Made by @Zulus-code • Version 2.3.0 — see CHANGELOG for release history.

About

☀️ Animated real-time weather desklet for Cinnamon (Linux Mint) — particle effects, glassmorphism, live forecast

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages