◉ Pulse
GreenScreen410 avatar
#26 today

GreenScreen410/singularity

Rust App #blackhole #rust #screen-saver #shader

A drifting black hole that gravitationally lenses your desktop. Ray-traced Schwarzschild geodesics, live.

Created Jul 18, 2026
Stars
12
Today
+12
Forks
1
Quality
100/100
Momentum
21

README

Fetched from GitHub on Oct 30, 2026, 9:23 PM UTC · README.md

View original on GitHub

Third-party content — Open Source Pulse is not the owner of this repository.

This README belongs to GreenScreen410/singularity and its contributors. We fetch it directly from the project’s public GitHub repository and display it for reference only. All text, code, images and trademarks remain the property of their respective authors. See the repository for its license terms. Copyright / takedown policy.

Singularity

A slowly drifting black hole that bends your entire Windows desktop like a real gravitational lens - as a single standalone app. No terminal, no external tools: run one executable and the hole wanders across your screen, warping whatever it passes over.

Inspired by ghostty-blackhole, but freed from Ghostty and Claude Code.

A black hole drifting across the desktop, lensing the windows around it

Features

  • Real physics - every pixel near the hole integrates its own null geodesic through the Schwarzschild metric (after Eric Bruneton's black-hole renderer, via ghostty-blackhole): a true shadow, an Einstein ring with mirrored secondary images, and a tilted Keplerian accretion disk whose far side arcs over and under the hole
  • Blackbody accretion disk - Shakura-Sunyaev temperature profile, relativistic Doppler shift and beaming, gravitational time dilation
  • 8 looks, switched live - Inferno, Gargantua, Quasar, M87* donut, Blazar, Face-on ember, Pure lens, Zen - pick from the tray menu, with a smooth crossfade (the original tuner's presets, exact values)
  • A real overlay - fullscreen, always-on-top, click-through; your apps keep working underneath while the hole warps them. The overlay excludes itself from capture, so there is no mirror-feedback
  • Place it anywhere - hold Ctrl+Shift and the hole follows your mouse; release to pin it in place. Tray: Position, or pin_x/pin_y in the config file; Auto drift resumes the wandering
  • Multi-monitor - the hole roams across all monitors by default, crossing boundaries seamlessly (one overlay and capture per monitor). Confine it to a single monitor from the tray or with monitor in the config file
  • Kerr mode - give the hole spin (tray: Spin, config: spin up to 0.98) and it integrates exact Kerr geodesics in Kerr-Schild coordinates instead of Schwarzschild: frame dragging displaces the shadow against the lensing, the ISCO shrinks so the disk hugs the hole, and the field twists asymmetrically. On top of the exact geometry sits a deliberately dramatized swirl layer, because the true twist is physically real but too subtle to read at desktop scale. Costs more GPU while nonzero
  • Screensaver mode - optionally appear only after N minutes without keyboard/mouse input, swelling out of nothing, and vanish on the first input (tray: Screensaver, or idle_minutes in the config file)
  • Update notice - once a day the app asks GitHub whether a newer release exists and, if so, adds an "Update available" entry to the tray menu that opens the releases page. That is the only network access it ever makes; set check_updates = 0 in the config file to disable it
  • Single self-contained exe - no runtime, no installer, ~8 MB

Build & run

Windows (primary platform, tested)

Requires Rust with the MSVC toolchain (the default on Windows) and Windows 10 2004+ / Windows 11.

cargo run --release

The overlay covers the screen, the hole drifts on its own, and clicks pass through to your apps. Switch the disk look from the tray icon (the ^ overflow area) - 8 presets from Inferno to Zen. Quit via the tray menu or Esc.

Cross-compiling from WSL also works: rustup target add x86_64-pc-windows-gnu, install mingw-w64, then cargo build --release --target x86_64-pc-windows-gnu.

macOS (UNTESTED - help wanted)

Requires macOS 12.3 or newer.

The macOS port (ScreenCaptureKit capture + NSWindowSharingNone self-exclusion

  • menu-bar presets) is structurally complete and kept type-checked via cargo check --target aarch64-apple-darwin, but has never run on real hardware - there is no Mac in this project's dev loop.
cargo run --release   # on a Mac

On first launch, grant Screen Recording permission (System Settings → Privacy & Security) and relaunch. If you try it, success or failure reports are equally welcome as issues.

Linux

Not yet - neither X11 nor Wayland offers a way to exclude a window from capture, so a live overlay feeds back into itself. A wallpaper-warp mode is the likely path; contributions welcome.

No-build alternative (ShaderGlass)

If you just want the effect over your desktop today without building anything, shaderglass/ contains the same lens as a shader for ShaderGlass: load shaderglass/singularity.slangp via Shader → Import custom with Input → Desktop and Output → Mode → Glass. This is the stop-gap; the standalone app above is the real goal.

How it works

The desktop is captured into a GPU texture and plays the role of the lensed "sky". For each pixel near the hole, the fragment shader integrates a photon geodesic in the Schwarzschild metric (leapfrog, adaptive step): rays under the critical impact parameter fall in (the shadow), escaping rays are projected back onto the sky plane (lensing, Einstein ring, mirrored images), and every crossing of the tilted disk plane accumulates blackbody emission shifted by the relativistic Doppler factor. Far from the hole an analytic weak-field formula takes over with a seamless handoff. The centre follows a slow Lissajous path so the hole drifts on its own.

Tuning: disk looks live in src/main.rs (PRESETS), size in HOLE_RADIUS, drift and integration budget in src/singularity.wgsl (DRIFT_*, N_STEPS).

Performance & battery

Capture is zero-copy on Windows: each desktop frame is GPU-copied straight into a shared D3D12 texture that the shader samples, so frames never touch the CPU (with an automatic CPU fallback for setups where sharing is not available). Only pixels near the hole pay for geodesic integration, frames are delivered only when the screen changes, and the tray offers an FPS cap. In screensaver mode the renderer is fully idle until the hole appears. It is still a continuous visual effect though, so expect some battery cost while the hole is on screen.

Screenshots and the capture exclusion

The overlay excludes itself from screen capture: it captures the desktop itself, and without that exclusion it would see its own output and collapse into an infinite mirror. That would normally keep the hole out of your screenshots, so Singularity fixes them instead: when a full-screen screenshot lands on the clipboard right after Print Screen, the hole is composited back into the image before you paste it. Region snips and files saved to disk are deliberately left untouched, and fix_screenshots = 0 in the config file turns the whole thing off. Screen recording picks the overlay up as-is (the demo above is a plain screen recording).

A note on Windows SmartScreen

Release binaries are not code-signed (certificates are priced for companies, not desk toys). The first launch of a downloaded exe may show "Windows protected your PC" - click More info → Run anyway, or build from source.

Credits

License

MIT - see LICENSE.

Rendered by GitHub from the repository’s README. Scroll to read the full file.
First trending

Jul 19, 2026

first spotted on the list

Best rank

#26

highest position reached

Appearances

1

times on the trending list

Quality score

100

out of 100

Momentum

21

trend strength indicator

Star velocity

0.12

stars per day since creation

Activity — last 60 days

daily counts, collected every 6 hours
  • Stars
  • Forks
  • Merged PRs
  • Issues
  • Closed issues

Collecting activity data since launch — check back in a few days.

Star history

total stars per snapshot

Not enough snapshots yet — check back soon.

Rank history

position on trending · lower is better

Not enough snapshots yet — check back soon.

3D card for your website

Live HTML card with a glass surface and pointer tilt. Paste the iframe on any website.

<iframe src="https://www.notionpulse.cc/embed/GreenScreen410/singularity" width="420" height="240" style="border:0;max-width:100%;background:transparent" loading="lazy" title="GreenScreen410/singularity — trending on Open Source Pulse"></iframe>

Stars badge

Show current stars in your README or profile. Auto-updates every 6 hours.

GreenScreen410/singularity stars badge
Markdown
[![GreenScreen410/singularity](https://www.notionpulse.cc/api/badge/GreenScreen410/singularity.svg)](https://www.notionpulse.cc/repo/GreenScreen410/singularity)
HTML
<a href="https://www.notionpulse.cc/repo/GreenScreen410/singularity"><img src="https://www.notionpulse.cc/api/badge/GreenScreen410/singularity.svg" alt="GreenScreen410/singularity stars badge" /></a>

Repository of the Day

#26 Repository of the Day

Repository of the Week

#26 Repository of the Week

Repository of the Month

#26 Repository of the Month