Skip to content

Repository files navigation

❄️ Snowfall

Beautiful interactive snowfall overlay for macOS

A lightweight menubar app that brings winter magic to your desktop with GPU-accelerated snowflakes that interact with your windows.

FeaturesInstallationDemoConfigurationPrivacy

macOSSwiftMetalGitHub License


✨ Features

Core Functionality

  • 🎨 GPU-Accelerated Rendering — Powered by Metal for smooth performance with thousands of particles
  • 🪟 Window Collision Physics — Snowflakes realistically melt when landing on window borders
  • 🖱️ Mouse Interaction — Snowflakes react dynamically to cursor movement
  • 🌬️ Wind Simulation — Adjustable wind strength affects snowflake trajectories
  • 🖥️ Multi-Monitor Support — Works seamlessly across all connected displays

Customization

  • 3 Built-in Presets: Light Snow, Comfortable Background, Blizzard
  • Granular Controls:
    • Speed range (0.1–8.0)
    • Size range (1–25)
    • Particle count (100–10,000)
    • Wind strength (0–500)
  • Privacy-Focused — All processing happens locally; no data collection

📦 Installation

App Store (Recommended)

Download on the App Store

Homebrew

Get automatic updates via Homebrew:

brew install --cask barredewe/cask/snowfall

Manual Installation

  1. Download the latest release from Releases
  2. Unzip and move Snowfall.app to /Applications
  3. Launch and grant Screen Recording permission when prompted

🎬 Demo


⚙️ Configuration

Access settings via the menubar icon (❄️):

Presets

ModeParticlesSpeedSizeWindBest For
Light Snow8000.2–1.52–120.5Minimal distraction
Comfortable2,0000.5–3.03–151.0Balanced aesthetics
Blizzard6,0002.0–8.02–204.0Maximum winter vibes
CustomManual tuning

Advanced Settings

Window Interaction
Toggle collision physics for performance-critical workflows. When enabled:

  • Uses CGWindowListCopyWindowInfo API to detect window positions
  • Processes data in RAM only (no recording/storage)
  • Snowflakes melt gradually upon contact

Mouse Influence Radius: 50px default


🏗️ Technical Architecture

Technology Stack

  • Language: Swift 5.9+ with SwiftUI
  • Graphics: Metal API for compute & render pipelines
  • Physics: Custom particle system with SIMD2 vectors
  • Platform: macOS 11.0+ (Big Sur and later)

Key Components

SnowfallApp/
├── Common/
│ ├── Views/
│ │ ├── MenuBarSettings.swift # SwiftUI preferences UI
│ │ └── MetalSnowViewController.swift # MTKView controller
│ ├── Settings.swift # Codable configuration
│ ├── Snowflake.swift # Particle data structure
│ ├── SnowRenderer.swift # Metal pipeline manager
│ └── WindowInfo.swift # CGWindowListCopyWindowInfo wrapper
├── SnowfallApp.swift # App entry point
└── SnowShader.metal # GPU kernels (compute + render)

Performance Optimization

  • Compute Shader: Parallel particle updates on GPU
  • Instanced Rendering: Single draw call for all particles
  • Adaptive Caching: Window positions refreshed every 500ms
  • Point Primitives: Efficient anti-aliased circles via fragment shader

🛠️ Building from Source

Requirements

  • Xcode 15.0+
  • macOS 13.0+ SDK
  • Swift 5.9+

Build Steps

# Clone repository
git clone https://github.com/barredewe/snowfall.git
cd snowfall
# Open in Xcode
open Snowfall.xcodeproj
# Build & Run (⌘R)

🔒 Privacy

Zero Data Collection Policy

Snowfall operates entirely offline:

  • ✅ No network requests
  • ✅ No analytics/tracking
  • ✅ No third-party SDKs
  • ✅ All settings stored locally (UserDefaults)

Permissions Explained:

  • Screen Recording: Required only for window collision detection
  • Accessibility: Alternative permission for older macOS versions

See PRIVACY.md for full policy.


🤝 Contributing

Contributions are welcome!

Development Setup:

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Follow Swift API Design Guidelines
  4. Submit PR with detailed description

📄 License

Apache 2.0 License - see LICENSE for details.


🙏 Acknowledgments

  • Metal framework by Apple
  • Inspiration from classic screensavers
  • Icon design: SF Symbols

📧 Contact

Barredewe
📮 barredewe@gmail.com
🐙 GitHub


If you enjoy Snowfall, please ⭐ star this repository!

Made with ❄️ in Russia

About

Simple interactive snowfall for Mac OS app written on SwiftUI

Resources

Stars

73 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages