Skip to content

xi72yow/ScreenChaser

Repository files navigation

ScreenChaser Banner

ScreenChaser

GitHub all releases Discord

What is ScreenChaser

ScreenChaser is a Rust bias lighting daemon for Linux. It captures your screen through the Wayland XDG Desktop Portal, extracts zone colors on the GPU via wgpu compute shaders, and streams them to WLED devices over UDP. The embedded webview frontend lets you configure LED layouts, scan the network for devices, and watch a live preview, all from a single native binary.

It replaces the original Electron-based ScreenChaser with a ~5 MB .deb that runs natively on Wayland, pulls only the hardware frames it needs through PipeWire, and offloads all per-pixel work to the GPU.

Demo

The render below illustrates the interaction of all components in a virtual room. It does not showcase every feature.

ScreenChaserVirtualRoom.mp4

Background

Bias lighting projects screen-derived colors behind the display to extend the image into its surroundings. The color extraction and temporal smoothing used here were developed and evaluated in my bachelor thesis, where 23 subjects rated five videos under four lighting modes (One Pixel, Rectangular Average, Average with Decay, and disabled) on a continuous Double-Stimulus quality scale. Average with Decay ranked highest across all clips.

Features

  • Wayland-native capture: XDG Desktop Portal + PipeWire stream, restore-token for dialog-free resume
  • GPU color extraction: wgpu compute shaders, three passes (extract, average, downscale), headless on Vulkan
  • WLED UDP output: DRGB realtime protocol on port 21324
  • mDNS discovery: automatic WLED device detection on the LAN, name sync from REST API
  • Embedded frontend: Vite + TypeScript, served from the binary through a custom sc:// protocol
  • Live preview: raw RGBA frames streamed over WebSocket, rendered to canvas in the UI
  • Tray icon: Ayatana AppIndicator integration, window hides on close and restores on tray click
  • Per-device config: parametric LED fields or custom positioned zones, enable/disable toggle, debounced persistence

Requirements

  • Linux with Wayland (tested on GNOME, KDE, Sway)
  • Vulkan-capable GPU (AMD, Intel, NVIDIA)
  • WLED device(s) on the local network, firmware 0.13+
  • GNOME users: AppIndicator and KStatusNotifierItem Support extension for the tray icon

Installation

One-liner via APT repository:

curl -fsSL https://xi72yow.github.io/ScreenChaser/install.sh | sudo bash

This imports the signing key, adds the APT source, and installs screenchaser-daemon.

Alternatively, grab the latest .deb from the releases page and install with sudo apt install ./screenchaser-daemon_*.deb.

Usage

Start the daemon:

screenchaser-daemon

On first run you will see the Wayland portal dialog asking which screen to capture. The daemon stores a restore-token in its config so subsequent starts skip the dialog.

Config lives at ~/.config/screenchaser/config.toml and is written back automatically (debounced 2 s) whenever you change settings in the UI.

The webview window hides on close. The daemon keeps capturing and streaming. Bring it back via the tray icon or the "Quit ScreenChaser" menu item to shut down cleanly.

Screenshots

Architecture

flowchart LR
    Screen([Screen]) -->|PipeWire| Capture
    subgraph Daemon[screenchaser-daemon]
        Capture[Wayland Capture<br/>ashpd + PipeWire]
        GPU[GPU Pipeline<br/>Rectangular Average<br/>+ Weighted Decay]
        WS[axum WebSocket<br/>:19447]
        Discovery[mDNS Discovery<br/>+ REST API]
        Webview[Webview<br/>tao + wry + Tray]
        Capture -->|BGRA frame| GPU
        GPU -->|LED colors| WS
        GPU -->|preview RGBA| WS
        Discovery --> WS
        Webview <--> WS
    end
    WS -->|DRGB :21324 UDP| WLED[WLED Devices]
    Discovery -.mDNS.-> WLED
    Webview -.sc://.- Frontend[Embedded Frontend<br/>Vite + TypeScript]
Loading

About

LEDs follow me!

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors