Skip to content

rittikbasu/lucent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lucent

a native macos menubar app that syncs a philips wiz bulb to whatever is on your screen.

why i built it

i got the idea for lucent after seeing aura, a project that syncs your smart bulb to the mood of a browser tab or youtube video.

i really loved the idea but i wanted it to work everywhere on my mac, not just inside my browser. and i wanted it to feel like a tiny native utility that was frictionless to use.

so i built lucent.

the goal here was different:

  • a menubar app
  • works across the whole mac
  • can follow a display or a specific app window
  • extremely simple ui
  • built to stay lightweight enough that you do not feel it running

what it does

  • discovers philips wiz bulbs on your local network
  • syncs bulb color to a display or app window
  • includes a preview mode so you can light the room even without selecting a source
  • lives in the menubar instead of taking over your desktop
  • uses direct local udp control for the bulb
  • stays focused instead of turning into a giant ambient lighting suite

install

download a release

for now, the intended install path is direct download from github releases.

download the latest release asset, move Lucent.app into /Applications and open it.

because the app is currently not notarized, macos may block it on first launch. if that happens:

  1. try opening lucent once
  2. open system settings → privacy & security
  3. scroll down to the security section
  4. click open anyway
  5. reopen lucent

build from source

requirements

quickstart

  1. clone the repo:

    git clone https://github.com/rittikbasu/lucent.git
    cd lucent
  2. generate the xcode project:

    xcodegen generate
  3. build from terminal:

    xcodebuild -project Lucent.xcodeproj -scheme Lucent -configuration Debug -derivedDataPath .build build

the built app lands at .build/Build/Products/Debug/Lucent.app.

first run

on first launch, lucent needs three things:

  1. a wiz bulb on the same local network
  2. screen recording permission so it can read displays and windows
  3. a selected source if you want full sync instead of preview lighting

the usual flow is:

  1. open lucent from the menubar
  2. let it find your bulb
  3. grant screen access
  4. choose a display or app
  5. tap the orb to start syncing

if the system permission prompt does not appear, lucent can open the screen recording settings page directly for you.

performance

i am obsessed with making performant systems, so lucent couldn't be a pretty toy that quietly eats cpu in the background all day.

lucent is designed so that the real day-to-day path, syncing with the popover closed, stays extremely light. in my current testing, that state can stay under <1% cpu even while active.

that is not a hard guarantee for every machine, every video, or every source, but it is the target shape of the app:

  • lightweight when sitting in the menubar
  • cheap enough to leave running
  • fast enough to react without feeling laggy

if you keep the popover open during sync, cpu usage can go higher because lucent is also rendering the live ui.

how it works

  • ScreenCaptureKit captures a display or app window
  • lucent analyzes a very small frame instead of trying to behave like a full video renderer
  • SyncController handles scene cuts, smoothing, brightness shaping and update coalescing
  • WizClient sends direct local setPilot udp commands to the bulb
  • the core path has no cloud dependency, no localhost bridge and no python runtime

current limitations

  • wiz bulbs only
  • drm-protected or capture-restricted windows can go black on macos
  • window identities are not stable forever, so a saved app window may need to be reselected after relaunch or after the target app changes state
  • the app currently requires manual first-run approval because it is not notarized yet

contributing

open a pr if you want.

bug fixes, capture reliability improvements, performance work, release automation and ui polish are all welcome.

About

a macos menubar app that syncs a philips wiz bulb to whatever is on your screen

Resources

Stars

Watchers

Forks

Contributors

Languages