Native Go system tray utility to prevent external HDDs from sleeping and freezing File Explorer.
- Motivation & Problem Solved
- Installation & Quickstart
- Key Features
- Architecture & Data Flow
- System Tray UI & Visual Indicators
- CLI Flags & Runtime Usage
- Configuration Schema
- Development & Build Workflow
- Troubleshooting & FAQ
- License
- The Problem: External mechanical hard drives (such as WD Elements, Seagate Expansion, etc.) employ aggressive internal firmware APM / standby sleep timers (~30β120s of idle time). Whenever Windows File Explorer, a terminal, or any application attempts to access the drive or open a file dialog, the entire operating system interface can freeze for 3β8 seconds while platters spin up from 0 to 5400/7200 RPM. Continual spin-down cycles also accelerate mechanical wear and tear on the spindle motor and head armatures.
- The Solution: DrivePulse is a lightweight, zero-dependency native Go tray utility that writes a micro-timestamp heartbeat (
.drivepulse.pingvia unbufferedO_SYNC+fsync) at configurable intervals (default: 45s), keeping selected external drives responsive 24/7 without preventing OS sleep.
Download the latest standalone binary directly for your platform:
- Windows: DrivePulse-windows-x64.exe β direct standalone executable, zero dependencies.
- Linux: DrivePulse-linux-x64 β make executable (
chmod +x DrivePulse-linux-x64) and run./DrivePulse-linux-x64. - Integrity & Release Hub: checksums.txt (SHA256) | All Releases & Notes
If building from source, DrivePulse uses a standard Makefile workflow:
# Clone the repository
git clone https://github.com/sudoShikhar/DrivePulse.git
cd DrivePulse
# Setup dependencies and launch application locally
make setup
make run- β‘ Zero-Lag Drive Access: Eliminates 3β8s File Explorer and application freezes by keeping chosen drives in active ready state.
- ποΈ Per-Drive Toggle & Selection: Individually enable or disable keep-alive heartbeats for specific drive letters or mount points.
- π‘οΈ Hotplug & Eject Resilience: Disconnected drives remain saved in settings and resume heartbeats automatically the moment they are reconnected.
- πͺΆ Ultra-Low Footprint: ~5β10 MB RAM, 0% CPU consumption at idle, zero background overhead.
- π¦ Single Standalone Binary: 100% pure Go with embedded PE icons and resources (
//go:embed+go-winres)βno DLL dependencies or CGO required. - π 7-Day Rolling File Logs & Clipboard Export: Daily rotating log files with automatic 7-day retention cleanup and a one-click tray menu option to copy recent logs to clipboard.
- π Seamless Auto-Start & Self-Installation: Optional OS startup integration for Windows (
Registry Run) and Linux (~/.config/autostart/drivepulse.desktop).
flowchart TD
subgraph UI["1. System Tray Interface"]
TrayIcon["Systray Icon<br/>(π’ Active / βͺ Inactive / π‘ Warning)"]
TrayMenu["Context Menu<br/>β’ Drive Toggles & Master Switch<br/>β’ Ping Interval (30sβ90s)<br/>β’ Export Logs & Auto-Start"]
TrayIcon --> TrayMenu
end
subgraph Core["2. DrivePulse Runtime Engine"]
Config["Config Manager<br/>(config.json)"]
Scanner["Drive Discovery<br/>(Hotplug & Mount Scanner)"]
Engine["Keep-Alive Ticker Engine<br/>(Configurable Interval: 45s)"]
Config -->|Target Drives & Interval| Engine
Scanner -->|Active Drive Mounts| Engine
end
subgraph Storage["3. Target Storage Operations"]
DriveE["Target Drive E: (External 16TB HDD)<br/>β‘ Heartbeat Ping (O_SYNC + fsync)"]
DriveF["Target Drive F: (External 8TB HDD)<br/>β‘ Heartbeat Ping (O_SYNC + fsync)"]
DriveC["System Drive C: (OS NVMe SSD)<br/>βοΈ Excluded / Skipped"]
end
subgraph Diagnostics["4. Logging & Diagnostics"]
RingBuf["500-Entry Ring Buffer<br/>(In-Memory Fast Clipboard Export)"]
DiskLog["Daily Rotating File Logger<br/>(7-Day Retention Cleanup)"]
end
TrayMenu -->|Persist Settings| Config
TrayMenu -->|Manual Refresh| Scanner
Engine -->|Micro-Ping Write| DriveE
Engine -->|Micro-Ping Write| DriveF
Engine -.->|Bypassed| DriveC
Engine -->|Live Session Events| RingBuf
Engine -->|Disk I/O Telemetry| DiskLog
Important
Toolchain Prerequisites: When compiling from source, Go 1.24+ and make are required. Pre-compiled binaries downloaded directly from GitHub Releases require zero runtime dependencies.
Clicking the system tray icon opens the native context menu:
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β π’ DrivePulse: Active (2 drives awake) β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β [β] E:\ - 16TB Elements (Active) β <-- Click to toggle
β [β] F:\ - 8TB Backup (Active) β <-- Click to toggle
β [ ] D:\ - Internal HDD (Disabled) β <-- Click to toggle
β [ ] C:\ - OS NVMe SSD (Disabled) β <-- Click to toggle
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β‘ Master Keep-Alive: [ ON ] β <-- Master pause/resume
β π Ping Now β <-- Instant heartbeat trigger
β β±οΈ Interval: 45s βΈ β <-- Submenu: 30s, 45s, 60s, 90s
β π Copy Logs β <-- Copies session log to clipboard
β π Open Logs Folder β <-- Opens persistent 7-day logs folder
β π Start with Windows / Linux [β] β <-- Auto-start on system boot
β π Refresh Drives List β <-- Re-scans connected storage
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β Exit DrivePulse β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
- π’ Vibrant Emerald Green: Active (at least 1 drive is actively kept awake).
- βͺ Dark Gray Monochrome: Inactive (all drives disabled or master switch is OFF).
- π‘ Amber / Warning: One or more configured drives are currently disconnected.
When invoking the compiled binary directly from the command line:
# Launch with custom configuration path
./DrivePulse -config "/path/to/custom-config.json"
# Launch in-place without self-installing to AppData
./DrivePulse -in-place
# Check version and build information
./DrivePulse -version| Flag | Type | Default | Description |
|---|---|---|---|
-version |
bool |
false |
Displays application version and build date |
-config <path> |
string |
Auto-detected AppData path | Specifies custom path to config.json |
-autostart |
bool |
false |
Flag passed when launched via OS startup |
-in-place |
bool |
false |
Runs in current directory without self-installing to AppData |
| OS | Configuration File Path | 7-Day Rolling Logs Directory |
|---|---|---|
| Windows | %APPDATA%\DrivePulse\config.json |
%APPDATA%\DrivePulse\logs\drivepulse-YYYY-MM-DD.log |
| Linux | ~/.config/DrivePulse/config.json |
~/.config/DrivePulse/logs/drivepulse-YYYY-MM-DD.log |
Logs older than 7 days are automatically pruned on startup to maintain a minimal disk footprint.
DrivePulse persists settings in JSON format matching config.example.json:
{
"master_enabled": true,
"interval_seconds": 45,
"selected_drives": [
"D:\\",
"E:\\"
],
"autostart": true
}| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
master_enabled |
bool |
true |
Yes | Master switch controlling heartbeat activity |
interval_seconds |
int |
45 |
Yes | Interval between keep-alive pings (in seconds) |
selected_drives |
array |
[] |
Yes | Array of drive roots / mount paths to keep awake |
autostart |
bool |
false |
No | Whether DrivePulse should start on OS login |
All development, formatting, testing, and compilation workflows are unified in the Makefile:
make help # Display available targets and descriptions
make clean # Remove builds/ directory and compiled binaries
make setup # Download and tidy Go dependencies
make lint # Run static analysis (go vet & staticcheck)
make format # Format code, organize imports, and run static analysis
make test # Run unit tests with code coverage
make run # Launch application locally directly from source
make build # Cross-compile Windows and Linux binaries with PE icon resourcesDoes DrivePulse prevent my computer from sleeping or suspending?
No. DrivePulse only writes small micro-timestamp files to selected external disks. It does not call Windows or Linux power assertion APIs (SetThreadExecutionState / org.freedesktop.ScreenSaver), so your PC will sleep and hibernate normally based on your OS power plan.
Why does my anti-virus flag newly compiled Go binaries?
Unsigned standalone Go binaries that interact with system tray APIs, registry autostart keys, and disk writes can occasionally trigger heuristic false positives in generic anti-virus engines. DrivePulse is 100% open source under the GPL-3.0 license and contains zero telemetry or hidden network calls. You can inspect all source code in src/ and compile directly using make build.
Why is the tray icon not showing on GNOME Linux?
Modern GNOME desktop environments require the AppIndicator and KStatusNotifierItem Support shell extension to render system tray icons. Ensure this extension is installed and enabled on GNOME. On KDE Plasma, XFCE, and Windows 10/11, tray support works natively out of the box.
This project is licensed under the GNU General Public License v3.0 β see the LICENSE file for details.