Skip to content

chiliec/Snowfall

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

38 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

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.

Features โ€ข Installation โ€ข Demo โ€ข Configuration โ€ข Privacy

macOS Swift Metal 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

Mode Particles Speed Size Wind Best For
Light Snow 800 0.2โ€“1.5 2โ€“12 0.5 Minimal distraction
Comfortable 2,000 0.5โ€“3.0 3โ€“15 1.0 Balanced aesthetics
Blizzard 6,000 2.0โ€“8.0 2โ€“20 4.0 Maximum winter vibes
Custom โ€” โ€” โ€” โ€” Manual 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

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Swift 82.8%
  • Metal 17.2%