Editor Weather ❄🍂🌧
Snow falls over VS Code and piles up along the bottom of the window. Move your mouse quickly through the pile to shovel it away.
In fall, autumn leaves come down instead: they flutter and tumble, pile up into a heap, and fly up when you rake through them.
In rain mode, slanted streaks splash where they land and collect into a rippling puddle that rises along the bottom. Sweep through it to splash water away; the dip fills back in.
Install
- Install the extension (from the Marketplace, or Extensions → ⋯ → Install from VSIX… with
editor-weather-1.7.0.vsix).
- A popup asks whether to turn the weather on. Click Turn On, then Quit VS Code, and reopen it. (Missed the popup? Click Weather off in the bottom-right status bar and choose Turn On.)
- VS Code may warn that your installation "appears to be corrupt". That's expected (see below). Choose Don't Show Again.
Use
- Shovel / rake / splash: the cursor is the blower. Move it through the pile and it blows a hole right where it is, even deep inside a tall pile; what it hits directly bursts away and fades. Snow or leaves above the hole get thrown up into the air, tumble, fall back with gravity and land on the pile again. Anything left above the hole crumbles in after a second or two (water fills back in faster).
weather.shovelRadius (10–300px, default 50) sets the size of the hole around the cursor.
- Fish: once the rain puddle is about 30px deep, fish start swimming in it (more water, more fish, up to 12). They dart away from the cursor, get flung out of the water when you blast them and splash back in, and fade away if the water drains. Turn them off with
weather.fish.
- Performance: the weather draws at most 60 frames a second and at normal (not Retina) resolution, and only repaints the pile when it changes.
weather.quality is auto by default: if VS Code starts dropping frames it lowers resolution and how much is in the air, and raises them again once things are smooth. Set it to low on slower machines, or high for full Retina sharpness.
- Blowing: flick the mouse near falling snow or leaves to blow them around (reach is twice Shovel Radius). Snow and leaves knocked off the pile fly up and fade away. In rain, the cursor works like an umbrella: drops slide off it and leave a dry spot underneath.
- Piling: by default the pile can grow all the way to the top of the window. Set
weather.maxPileHeight to a pixel height to limit it, or turn weather.pileUp off to have everything disappear when it reaches the bottom. weather.pileRate (0.1–20, default 1) sets how fast the pile grows without changing how much falls: at 1× a 600px-tall window fills in roughly 20–35 minutes, at 10× in 2–4.
- Season:
weather.season is auto by default: leaves September–November, snow December–February, rain March–August. Pick Snow, Leaves, Rain or Auto from the status-bar menu (or Weather: Switch Season); it switches instantly, no reload needed.
- Fall Speed:
weather.fallSpeed (0.05–4, default 1) sets how fast everything falls and drifts.
- Amount Per Second:
weather.amountPerSecond (1–400, default 40) sets how many fall. Leaves fall at about a third of it, rain at four times it. At most about 3,000 flakes or raindrops, or 1,200 leaves, are on screen at once.
- Variation:
weather.variation (0–1, default 0.6) makes the weather uneven: random timing, flurries and lulls that drift above and below Amount Per Second over 10–40 seconds, and wind gusts. 0 is steady and evenly timed.
- Status-bar menu: click ❄ Snow / 🍂 Leaves / 🌧 Rain in the bottom-right corner to pause or resume, choose what's falling, clear the pile, or open the settings. Weather: Options… opens the same menu, and Weather: Pause / Resume still works on its own.
- Weather: Clear Pile melts the whole pile.
- Settings (
weather.*): season, fallSpeed, amountPerSecond, variation, fish, quality, pileUp, pileRate, maxPileHeight, shovelRadius, flakeSize, wind. Changes apply live within a second or two; no reload needed. (Settings from when this extension was called Snowfall, snowfall.*, keep working until you set the new weather.* ones.)
How it works and caveats
The extension API can't draw on top of the editor, so this extension adds a script tag to VS Code's own workbench.html (a backup is saved next to it as workbench.html.weather-backup). The overlay is a canvas with pointer-events: none, so clicks and typing pass straight through.
- That edit is what triggers the "corrupt installation" warning. Nothing is actually broken.
- When you update this extension (or VS Code wipes the overlay during its own update), the extension refreshes the overlay by itself and asks you to quit and reopen VS Code once. VS Code caches the overlay script, so a window reload isn't enough for new code. Settings are kept in a separate file the overlay re-reads, so they never need a restart.
- Updating VS Code replaces
workbench.html and removes the weather. On the next start the extension offers to put it back.
- If you used this extension back when it was called Snowfall, turning it on replaces the old overlay, so you don't need to remove it first.
- Uninstalling the extension removes the overlay automatically the next time VS Code restarts. To remove it without uninstalling, choose Turn Off in the status-bar menu (or run Weather: Uninstall Overlay); it stays off until you turn it on again.
- The mouse isn't tracked over webviews (Markdown preview, some panels), because those are separate frames.
- VS Code must be installed somewhere your user account can write to.
| |