Your PC has a breaking point β and it's exactly one gesture away. Push it too far and it storms off on the spot. It finally had enough.
Show your webcam "the gesture" and your PC shuts itself down on the spot. No buttons. No menus. Just vibes and consequences.
- π Real-time hand tracking via MediaPipe landmarks (high accuracy)
- π¨ Contour-based fallback using HSV skin detection β works even without MediaPipe
- β οΈ Instant shutdown trigger β no hold time, no second chances
- πͺ Selfie-mode webcam feed with live gesture overlay
- π§ͺ Test mode β shutdown is logged, not executed, so you can safely test
- πΌ Visual skeleton rendering β draws hand bones and joints on screen
- Python 3.9-3.12 (MediaPipe-supported)
- Webcam
| Package | Version |
|---|---|
| opencv-python | >=4.5.0 |
| mediapipe | >=0.10.21 |
| numpy | >=1.21.0 |
MediaPipe is optional but strongly recommended for accurate gesture detection. Without it, the program falls back to skin-color contour detection.
- Clone the repository and enter the project folder:
git clone https://github.com/vedant-kawale-27/AngryPC.git
cd AngryPC- Open a terminal in the project folder (
AngryPC). - (Recommended) Create a virtual environment:
python -m venv venvIf you have multiple Python versions installed, create it with a specific version:
py -3.xx -m venv venveg. python -3.11 -m venv venv "Make sure the version you use is MediaPipe-supported (see Requirements above)."
- Activate the virtual environment:
Windows (Command Promt):
.\venv\Scripts\activate.batmacOS/Linux:
source venv/bin/activate- Install dependencies:
pip install -r requirements.txt- Start the program:
python angrypc.py- Your webcam opens. Show the configured gesture to trigger the action.
- To quit safely without triggering shutdown, press
Q.
You can tweak behavior inside angrypc.py when creating the detector:
detector = HandGestureShutdown(
gesture_hold_time=0.0, # Seconds gesture must be held (0 = instant)
trigger_gesture="Middle Finger" # Gesture name that triggers shutdown
)Shutdown is disabled by default for safe testing. The program prints:
SHUTDOWN INITIATED!
TEST MODE: Shutdown command skipped.
To enable real shutdown, update the shutdown_computer() method in angrypc.py with your OS-specific command:
# Windows
os.system("shutdown /s /t 1")
# macOS
os.system("sudo shutdown -h now")
# Linux
os.system("sudo shutdown -h now")- Webcam captures live video frames
- MediaPipe detects hand landmarks in real time
- Finger states (extended / folded) are computed from landmark positions
- If only the middle finger is extended β gesture matches β shutdown triggers
- If MediaPipe is unavailable, falls back to HSV skin segmentation + convex hull analysis
angrypc/
β
βββ angrypc.py # Main program β gesture detection + shutdown logic
βββ requirements.txt # Python dependencies
βββ README.md # You're reading it
This is a fun project. Use responsibly. Save your work before testing. The author is not responsible for unsaved documents, lost progress, or your PC's hurt feelings.
MIT β do whatever you want, just don't blame us.