A frameless floating pill widget for Windows that shows real-time CPU load and network throughput β always on top, zero chrome, zero bloat.
βββββββββββββββββββββββββββββββββββββββββββββββ
β β 12.4 Mbps β β 84.1 Mbps β CPU 37% β
β Uplink β Downlink β β
βββββββββββββββββββββββββββββββββββββββββββββββ
A dark pill-shaped overlay that lives at the top of your screen. Draggable. No taskbar entry. No window border.
- Real-time stats at 1 s intervals β upload speed, download speed, CPU usage
- Active NIC auto-detection β routes a dummy UDP socket to 8.8.8.8 and resolves the interface; refreshes every 10 ticks to handle Wi-Fi β Ethernet switches without speed spikes
- EMA smoothing β
0.7 Γ raw + 0.3 Γ prevon both upload and download to kill jitter - Unit toggle β right-click the pill β
β B/stoggles between Mbps and MBps on the fly - Draggable on the X axis β grab anywhere on the pill, release anywhere; position is persisted across restarts
- Right-click context menu β Exit / Toggle unit / Reset position / Cancel; auto-dismisses after 4 s
- Always on top, frameless, transparent β composited over your desktop with backdrop blur
- Auto-installs
psutilif not present on first run - One-click NSIS installer via
electron-builder
| Layer | Technology |
|---|---|
| Shell / window | Electron 29 |
| Stats backend | Python 3 + psutil |
| IPC | child_process.spawn β stdout JSON lines |
| UI | Vanilla HTML/CSS β Outfit font, CSS grid pill layout |
| Installer | electron-builder NSIS |
NETWORK-CPU-MONITOR-WIDGET/
βββ main.js # Electron main β window creation, IPC handlers, Python spawn
βββ preload.js # contextBridge β exposes api.stats(), api.quit(), api.setWindowPosition()
βββ index.html # Pill UI β layout, drag logic, unit toggle, confirm tooltip
βββ stats.py # Python stats daemon β psutil NDIS counters + PDH CPU β JSON stdout
βββ start.bat # Dev launcher: npm start
βββ package.json # electron-builder config, extraResources: stats.py
βββ package-lock.json
- Windows 10 / 11
- Node.js 18+ (for dev / building from source)
- Python 3.8+ accessible as
pythonorpython3on PATHpsutilis auto-installed on first run if missing
git clone https://github.com/AnonymousV73X/NETWORK-CPU-MONITOR-WIDGET.git
cd NETWORK-CPU-MONITOR-WIDGET
npm install
npm startOr double-click start.bat.
npm run buildOutputs an NSIS .exe installer under dist/. The installer is one-click, per-user, creates desktop + Start Menu shortcuts, and launches the widget after install. stats.py is bundled as an extra resource alongside the Electron app.
Electron main.js
β
ββ spawns stats.py as a child process
β β
β ββ emits one JSON line/sec: {"dn": 12.4, "up": 0.3, "cpu": 37.1}
β
ββ buffers stdout by newline, parses JSON, caches latest sample
β
ββ preload.js exposes window.api.stats()
β
ββ index.html polls every 1 s, formats values, updates DOM
stats.py resolves the active NIC by attempting a connectionless UDP connect to 8.8.8.8:80 and matching the returned local IP against psutil.net_if_addrs(). Byte deltas are divided by elapsed wall time and smoothed with an EMA before being converted to Mbps (bytes / 125_000).
| Action | Result |
|---|---|
| Drag (left-click + move) | Repositions pill horizontally |
| Right-click | Shows confirm tooltip |
| Tooltip β Exit | Kills Python subprocess, closes window |
| Tooltip β β B/s | Toggles Mbps β MBps display |
| Tooltip β Reset | Moves pill back to default position |
| Tooltip β Cancel / click outside | Dismisses tooltip |
| Tooltip auto-dismiss | 4 seconds of inactivity |
No config file. Everything is baked into main.js defaults:
| Setting | Default | Where to change |
|---|---|---|
| Window width | 300 px | main.js β BrowserWindow options |
| Window height | 59 px | main.js β BrowserWindow options |
| Y position (fixed) | 0 (top of screen) | main.js β setPosition |
| Poll interval | 1000 ms | index.html β setInterval |
| EMA alpha | 0.7 | stats.py β ema_dn / ema_up lines |
| NIC refresh rate | every 10 ticks | stats.py β nic_check_counter |
- Windows only. The psutil NDIS counter path and the
Get-NetAdapterStatisticsfallback are both Windows-specific. macOS/Linux would need a different NIC resolution path. - Python must be on PATH for the dev build. The packaged installer relies on a bundled Python runtime (not included by default β add a
python-standaloneextraResource if distributing to machines without Python). - Single monitor support. The widget pins to the top of the primary display. Multi-monitor Y-axis positioning is not implemented.
ANONYMOUS-V73X β github.com/AnonymousV73X