Plays moaning sounds when you slap your laptop. Inspired by SlapMac - but for Windows, macOS, and Linux.
When available, The Moaning Guy can use a built-in accelerometer / motion sensor for more precise slap detection. On devices without sensor support, it automatically falls back to the microphone detector.
A slap on the laptop chassis produces a sharp, short impulse that is easy to distinguish from normal audio. The app listens in real time, detects either motion spikes or microphone amplitude spikes above a configurable threshold, and plays a random sound from your selected bundle.
Mic Input -> Amplitude Analysis -> Spike Detection -> Sound Playback
(cpal) (threshold + cooldown) (rodio)
- Volume scales with force - harder slap = louder moan
- Shuffle bag - plays through all sounds before repeating any
- No overlap - new trigger stops the previous sound
- Accelerometer mode - use supported sensor hardware for tighter slap detection
- Microphone fallback - works on devices without a motion sensor
- Port rules - trigger bundles on charging, USB storage, external display, Ethernet, and dock events
- Adjustable sensitivity - tune it for your environment
- Cooldown timer - prevent rapid-fire triggers
+-----------------------------------------+
| System Tray |
| Pause/Resume · Test · Settings · Quit |
+--------------+--------------------------+
|
+-------v--------+ <- HTML/CSS/JS (Tauri webview)
| Settings UI |
| (settings.html)|
+-------+--------+
| IPC (invoke/emit)
+-------v--------+
| Rust Backend |
| |
| + Detector + | <- Dedicated thread, cpal mic input
| | Threshold | |
| | Cooldown | |
| | on_slap() | |
| +-----+-----+ |
| | |
| +-----v-----+ | <- Dedicated thread, rodio output
| | Player | |
| | Shuffle | |
| | Single | |
| +-----------+ |
| |
| + Settings + | <- Arc<Mutex<Settings>>
| | JSON disk | |
| +-----------+ |
+--------+-------+
|
+--------v--------+ <- %APPDATA% / ~/Library / ~/.local/share
| App Data Dir |
| sounds/ |
| bundle-a/ |
| bundle-b/ |
| settings.json |
+-----------------+
| Layer | Technology |
|---|---|
| Framework | Tauri v2 |
| Backend | Rust |
| Frontend | Vanilla HTML / CSS / JS |
| Audio Input | cpal |
| Audio Output | rodio |
| File Dialog | tauri-plugin-dialog |
- Node.js (v18+)
- Rust (latest stable)
- Tauri v2 prerequisites
Linux only:
sudo apt install libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libasound2-devgit clone https://github.com/adityapatel-00/themoaningguy.git
cd themoaningguy
npm install
npm run devnpm run buildProduces platform-specific installers in src-tauri/target/release/bundle/.
- Launch the app - it sits in your system tray
- Right-click the tray icon -> Settings
- Create a sound bundle and import your audio files (
wav,mp3,ogg,flac) - Pick Accelerometer or Microphone mode when available
- Configure Port Detection rules for connect/remove events
- Adjust sensitivity, cooldown, and volume
- Save - then slap your laptop
The settings screen also includes a small support prompt and footer links for GitHub Sponsors, Ko-fi, UPI (x.pulseop@axl), and starring the repo.
- Detection is best-effort and may produce false positives or miss some events.
- Port detection depends on what the operating system exposes on the current device.
- Microphone mode uses the active input device while the app is running.
- Accelerometer mode, when available, depends on supported sensor hardware and drivers.
- Background monitoring uses some CPU and battery, especially in microphone mode.
- Use the app responsibly on sensitive, shared, or production machines.
This software is provided "as is", without warranty of any kind. The author is not responsible for any damage, data loss, hardware issues, or unintended behavior that may result from using the app.
The app ships with a built-in starter bundle. To add your own:
- Open Settings -> create a bundle (for example,
animeordramatic) - Click + Add Sound Files inside the bundle
- Select audio files from your machine (
wav,mp3,ogg,flac) - Select the bundle as active and Save
Sounds are stored in your app data directory and persist across updates.
The GitHub Pages landing page lives in docs/index.html. Enable GitHub Pages from the repo docs/ folder to publish it.
| Platform | Tray Icon | Notes |
|---|---|---|
| Windows | Works out of the box | Appears in system tray |
| macOS | Works out of the box | Appears in menu bar. You may need to grant Microphone permission in System Settings -> Privacy & Security |
| Linux | Usually works | If the tray icon does not appear on GNOME, install the AppIndicator extension |
MIT
