Seven months ago I started building Smart Notch, a small notch at the top of the Windows screen that expands when you hover over it. It shows what's playing, your CPU, RAM and battery, a focus timer and clipboard history. 230+ commits later it has passed 15,000 downloads on the Microsoft Store.
Adding features turned out to be the easy part. The hard part was this: an always-on-top, transparent, animated window that runs all day must cost almost nothing when you aren't looking at it. Early builds didn't. With the music visualizer open, one build used more than 20% of my laptop's CPU.
Here is what I learned getting it down.
1. The window is bigger than the notch
The visible pill is small, about 170–360 px wide when collapsed. But it has to grow into a large panel without the window resizing on every animation frame (resizing a transparent window is slow and flickers). So the notch lives inside one fixed, frameless, transparent window, and most of that window is empty.
const win = new BrowserWindow({ frame: false, transparent: true, skipTaskbar: true, // ... }); win.setAlwaysOnTop(true, 'screen-saver'); // stays above most windows win.setIgnoreMouseEvents(true, { forward: true }); The empty part must not block clicks on the apps underneath. setIgnoreMouseEvents(true, { forward: true }) makes the whole window click-through, but still forwards mousemove events to the page. The renderer checks whether the pointer is over the pill. If it is, it tells the main process over IPC to make the window clickable again. When the pointer leaves, it switches back.
// renderer (simplified) pill.addEventListener('mouseenter', () => ipc.send('set-ignore-mouse-events', false)); pill.addEventListener('mouseleave', () => ipc.send('set-ignore-mouse-events', true, { forward: true })); 2. "Now playing" for every app
Windows already knows what's playing: every media app that shows up in the volume flyout publishes a session to the System Media Transport Controls (SMTC). Reading SMTC means Spotify, a YouTube tab in Chrome, Apple Music and VLC all work without separate integrations.
I read it in a separate Node worker process, so a slow call or a thumbnail decode never blocks the UI, and the worker only sends the renderer messages when something has changed.
3. Stop polling from PowerShell
My first system-stats code was the obvious Windows approach: PowerShell scripts calling Get-CimInstance in a loop. Each WMI call cost 3–15 ms of CPU, plus load on the WmiPrvSE process, every few seconds, forever.
Two changes removed that background cost:
- A small compiled C# helper for native work (audio devices, window queries, media keys) instead of scripted loops.
- Events instead of polling where Windows offers them. For example, brightness changes come from the
WmiMonitorBrightnessEventevent instead of reading the value every second.
4. The real lesson: you pay for frames drawn
This was the surprise. I measured, and on my laptop (i5-1035G1, Intel UHD, 60 Hz) the cost of the UI came down to one number:
About 0.6% of one CPU core for every frame per second Chromium draws.
The logic was cheap. Drawing was the cost. A UI that isn't animating costs about nothing, and a UI that animates at 60 fps costs a lot, even if the movement is a fraction of a pixel.
Here's what changed after rewriting the animations with that rule in mind:
| State | Before | After |
|---|---|---|
| Idle, collapsed | 2.9% | ~1.1% |
| Music playing, collapsed | 9.8% | ~2.7% |
| Expanded with visualizer | 21.5% | ~6.3% |
(Task Manager-style %, all cores)
What made the difference:
Infinite JS animations → CSS. Framer-motion loops that never ended were running JavaScript every frame. Moving them to CSS animations let Chromium's compositor run them.
Stepped easing for slow ambient motion. A glow that drifts 20 px over 8 seconds still makes Chromium draw 60 frames a second. Using steps() only draws a frame when the position actually changes by about a pixel:
.glow { animation: drift 8s infinite alternate; /* ~1 px per step for a 20 px move */ animation-timing-function: steps(24); } (In the app I go one step further: a helper samples the real ease-in-out curve into n jumps, so the motion keeps its easing.)
The motion looks the same, and the GPU idles between steps. When several layers animate, give them a shared step clock so their frames line up instead of alternating.
No backdrop-filter on a transparent window. On a transparent always-on-top window, blur means re-reading the desktop behind it constantly. I removed it.
Don't animate <svg> roots. Chromium doesn't put CSS transform animations on an <svg> element onto the compositor. Wrap the SVG in a <div> and animate the div instead.
A tip for checking: in DevTools, document.getAnimations() shows every animation running right now. In an idle state that list should be empty.
5. Benchmarking "music playing" in silence
I needed to measure the "music playing" state repeatedly without music playing through my speakers. The trick: a hidden window loops a generated silent WAV file and sets navigator.mediaSession.metadata. Windows registers that as a real media session, so the notch reacts exactly as it would to Spotify, and nobody has to listen to it.
6. Shipping it
Smart Notch is packaged as an AppX with electron-builder and distributed through the Microsoft Store, which handles updates and the optional one-time Pro purchase (synced lyrics, per-app volume mixer, file shelf, extra themes). The free version has everything in this post.
If you want to try it or poke at how it behaves:
- Microsoft Store: https://apps.microsoft.com/detail/9N1D46F5X565
- Site: https://smart-notch-windows.vercel.app/?utm_source=devto&utm_medium=article&utm_campaign=build_story
I'm curious what others have found keeping Electron overlays light. What would you measure next?

