taigrr/spank

Slap your MacBook, it yells back. Uses Apple Silicon accelerometer via IOKit HID.

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 1 hour ago
Added to GitGenius on September 13th, 2026
Created on February 23rd, 2026
Open Issues & Pull Requests: 0 (+0)
GitHub issues: Enabled
Number of forks: 264
Total Stargazers: 4,998 (+0)
Total Subscribers: 23 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 6.2 hours
Mean response time: 2.9 days
90th percentile: 32.8 hours
Tracked items: 33

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 0
New in 7 days: 0
Closed in 7 days: 0
Avg open age: N/A days
Stale 30+ days: 0
Stale 90+ days: 0

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

Spank is a fun utility that detects physical impacts on Apple Silicon MacBooks via the built-in accelerometer and plays audio responses.

The tool solves the problem of making your laptop interactive through physical interaction. It reads raw accelerometer data directly from the Bosch BMI286 IMU via IOKit HID, then applies vibration detection algorithms including STA/LTA analysis, CUSUM, kurtosis, and peak/MAD calculations to identify when the laptop has been struck. When a significant impact is detected, it plays one of several embedded MP3 audio responses depending on the selected mode. The tool includes optional volume scaling so lighter taps produce quieter responses and harder slaps play at full volume, plus adjustable playback speed control.

Spank is designed purely for entertainment and novelty use on Apple Silicon Macs running M2 or later chips, or the M1 Pro specifically. It requires sudo access to read from the accelerometer and runs as a single binary with no external dependencies. The tool offers multiple modes: Pain mode plays random protest audio clips, Sexy mode tracks cumulative slaps within a rolling window and escalates through 60 intensity levels, Halo mode plays death sound effects from the Halo video game series, and Custom mode lets you specify your own MP3 directory. Detection sensitivity is tunable through amplitude thresholds and cooldown periods, with a fast mode preset available for more responsive detection.

The project maintains a focused scope with straightforward implementation. Development activity shows regular refinement of the detection algorithms and user-facing tuning options, with attention paid to making the tool easy to install and run as a background service via launchd. The codebase remains minimal and self-contained, avoiding external dependencies while directly interfacing with macOS system APIs.