Command Usage
Flags
Mode Flags
These flags are mutually exclusive—you can only use one mode at a time.Enable sexy mode. Tracks slaps within a rolling window and escalates audio intensity based on frequency. The more you slap within a minute, the more intense the sounds become. Uses 60 levels of escalation.Short flag:
-sEnable Halo mode. Plays random audio clips from Halo soundtracks on each slap.Short flag:
-HPath to custom MP3 audio directory. Spank will randomly play MP3 files from this directory when slaps are detected. All files must be MP3 format.Short flag:
-cExample:Detection Flags
Minimum amplitude threshold for slap detection (range: 0.0-1.0). Lower values make the detector more sensitive to lighter taps; higher values require stronger impacts.The value represents the minimum acceleration amplitude in g-force required to trigger a sound.Recommended values:
0.05-0.10: Very sensitive, detects light taps0.15-0.30: Balanced sensitivity (default: 0.3)0.30-0.50: Only strong impacts trigger sounds
Standard Flags
Display the version number and exit.
Display help information and exit.Short flag:
-hExamples
Basic Usage
Custom Audio
Adjusting Sensitivity
Exit Codes
0: Successful execution (typically via Ctrl+C)1: Error occurred (missing sudo, invalid flags, sensor failure, etc.)
Behavior Details
Cooldown Period
Spank enforces a 750ms cooldown between audio responses to prevent rapid-fire playback. If multiple slaps are detected within this window, only the first triggers audio. SeeslapCooldown constant in main.go:69.
Mode Restrictions
The--sexy, --halo, and --custom flags cannot be combined. Attempting to use multiple mode flags will result in an error: