Control My Laptop
Go to projectA live web app that lets internet strangers control my laptop's brightness and volume in real time.
It looks like a macOS desktop, has a group chat, and streams my screen while people mess with my settings.
Overview
What happens when you hand strangers the controls to your computer?
Control My Laptop is a website where anyone can visit and actually change my laptop's brightness and volume. You press a button on the page, and my screen dims or my speakers get louder in real time. There's also a group chat where visitors can talk to each other (and to me), and a live screen share so everyone can see the chaos unfold.
The whole thing is wrapped in a pixel-perfect macOS desktop replica. The controls are styled as keyboard function keys. The chat looks like iMessage. The status bar updates live. It's a real-time interactive experience disguised as someone's desktop.
The Experience
You land on a fake desktop and realize the buttons actually do things
The page loads and it looks like you're staring at someone's Mac. There's a dock, a menu bar, draggable windows. Then you notice the function keys and sliders and start pressing things — and they work.
Press a function key
Brightness or volume control
You click one of the keyboard-style F-keys on the page. F1 and F2 control brightness. F10, F11, and F12 control volume. Or drag the sliders in the control panel for finer adjustments. Each action fires a WebSocket event to the server.
Socket.IO event emitterServer aggregates changes
Rate-limited and capped
The server collects button presses from all connected users and batches them into ticks every 200ms. Each tick caps the change at 10% to keep things from going haywire. There's also per-user rate limiting — 5 tokens per second, max 10 — so nobody can spam.
Token bucket rate limiterPython agent applies the change
OS-level control via pycaw + screen_brightness_control
A Python script running on my laptop receives the command over WebSocket and directly adjusts the Windows volume or screen brightness through OS APIs. It also polls every 2 seconds to detect when I manually change things from my end.
Windows COM + pycawEveryone sees the result
macOS-style OSD + live screen share
The current brightness and volume levels broadcast back to all connected clients. An OSD notification pops up on everyone's screen — just like the real macOS overlay. If screen sharing is on, visitors can watch my actual desktop react in real time.
WebRTC peer connectionsHow It Works
Browser to server to laptop — the full loop
Visitors interact through a browser. Their actions travel over WebSocket to a Node.js server on DigitalOcean, which batches and rate-limits everything before forwarding commands to a Python agent running on my local machine. The agent talks to Windows APIs to actually change brightness and volume, then reports the real values back so every client stays in sync.
Design Decisions
Why it works this way
Some choices that shaped how the project came together.
Why a macOS desktop replica?
The whole premise is "control my laptop." If it just looked like a generic web form with sliders, the connection between your actions and my physical machine would feel abstract. Making it look like my actual desktop closes that gap — you feel like you're reaching into my screen.
Why rate limit instead of lock out?
The point is chaos, but controlled chaos. Hard lockouts would kill the fun — people want to feel their actions landing. Token bucket rate limiting lets everyone participate while preventing any one person from dominating. The 10% cap per tick keeps things moving without breaking.
Why function keys instead of just sliders?
Physical keyboards have function keys for brightness and volume. Using that same visual language makes the controls instantly recognizable. People know what F1 and F12 do because they've pressed them on their own laptops. The sliders are there too, but the keys are what draw you in.
Why a group chat alongside the controls?
Without chat, you're just pressing buttons into a void. The chat makes it social — people react to each other's actions, coordinate, or just talk. It turns the site from a novelty into a shared experience. The iMessage styling keeps it consistent with the desktop theme.
Tech Stack
What's under the hood
Frontend
- Vanilla HTML / CSS / JS
- Socket.IO client
- WebRTC (getDisplayMedia)
- Draggable windows + macOS UI
Backend
- Node.js + Express
- Socket.IO (real-time events)
- Token bucket rate limiter
- DigitalOcean + PM2
Local Agent
- Python + python-socketio
- pycaw (Windows audio)
- screen_brightness_control
- Threaded OS polling