Skip to content

dinakars777/moody

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

moody 🫠

Your MacBook has feelings. And it's not afraid to express them.

Demo

What Is This?

Every hardware event triggers a personality response:

  • πŸ‘‹ Slap it β†’ it complains (and remembers)
  • πŸ”Œ Plug in USB β†’ it gets curious
  • ⚑ Connect charger β†’ it sighs with relief
  • πŸͺ« Battery dying β†’ it begs for its life
  • πŸ“Ά WiFi drops β†’ existential crisis
  • 🎧 Plug in headphones β†’ "just the two of us now"

Your MacBook's mood evolves based on how you treat it. Slap it too much? It gets grumpy. Charge it? It forgives you. Maybe.

Install

Download from releases, or build from source:

go install github.com/dinakars777/moody@latest
sudo cp "$(go env GOPATH)/bin/moody" /usr/local/bin/moody

Usage

# Start moody (SFW mode)
sudo moody

# NSFW mode 😏
sudo moody --spicy

# Show live mood dashboard
sudo moody --dashboard

# List available sensors
sudo moody --list-sensors

# Adjust slap sensitivity
sudo moody --min-amplitude 0.15

# Fast mode (quicker detection, shorter cooldown)
sudo moody --fast

# Silent mode (disables TTS voice, text only)
sudo moody --silent

# Verbose logging
sudo moody --verbose

Requirements

  • macOS on Apple Silicon (M2+ or M1 Pro)
  • sudo (for accelerometer access)
  • Go 1.22+ (if building from source)

How It Works

  1. Reads accelerometer data via IOKit HID to detect physical impacts
  2. Monitors USB, power, battery, and lid state via IOKit
  3. Monitors WiFi and Headphone connections using networksetup and CoreAudio
  4. Maintains a 3-axis mood engine (happiness, energy, trust)
  5. Mood persists to ~/.moody/state.json β€” your MacBook remembers
  6. Selects personality-appropriate responses based on current mood
  7. Speaks the response aloud using macOS Text-to-Speech (TTS) with mood-specific voices

The Mood System

Your MacBook's mood shifts with every event:

Mood Trigger Personality
😊 Happy Charged, USB in Cheerful, friendly
😀 Grumpy Slapped, charger removed Sarcastic, snippy
😰 Anxious Battery low, WiFi lost Panicky, desperate
🎭 Dramatic Multiple negative events Over-the-top theatrical
πŸ’€ Dead Inside Sustained abuse Nihilistic, apathetic

Voice Packs

# List installed packs
moody --packs

# Use NSFW pack
sudo moody --spicy

Built-in packs:

  • en_default β€” Passive-aggressive office coworker (SFW)
  • en_spicy β€” Your MacBook is... very friendly (NSFW πŸ”ž)

Options

Flag Description
--spicy Enable NSFW voice pack
--pack <NAME> Use specific voice pack
--dashboard Show live TUI mood dashboard
--mute Track mood without responses
--silent Disable TTS audio (text output only)
--fast Faster polling, shorter cooldown
--min-amplitude <F> Accelerometer sensitivity (default: 0.05)
--cooldown <MS> Min ms between responses (default: 750)
--no-accel Disable accelerometer
--no-usb Disable USB sensor
--no-power Disable power sensor
--no-lid Disable lid sensor
--no-wifi Disable WiFi sensor
--no-headphones Disable headphone sensor
--verbose Log all events
--list-sensors Show available sensors
--packs List voice packs

Contributing

Contributions welcome! Especially:

  • More voice packs (languages, personalities)
  • Display sensors
  • Gordon Ramsay voice pack
  • HAL 9000 voice pack

License

MIT

About

🫠 Your MacBook has feelings. Every hardware event triggers a personality response.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors