A lightweight, portable mouse trail effect for Windows that runs silently from your system tray. Perfect for screen recordings, presentations, or just adding a fun visual effect to your cursor!
- System Tray Integration - Runs quietly in the background, no console window
- Click-Through Overlay - Completely transparent to clicks, won't interfere with your work
- Toggle On/Off - Easy control via right-click menu in system tray
- Multi-Monitor Support - Works seamlessly across all displays
- Fully Portable - No installation required, just run and go
- Customizable - Easily adjust trail length, color, and thickness
Double-click install_dependencies.bat or run:
pip install -r requirements.txtDouble-click start_mouse_trail.pyw or start_tray.bat
The app will start silently and appear in your system tray (bottom-right corner).
Right-click the tray icon to access:
- Toggle Trail - Turn the mouse trail on/off
- Exit - Close the application
- Windows 10 or later
- Python 3.7+
- Dependencies (auto-installed via
install_dependencies.bat):pyautogui- Mouse position trackingpillow- Icon generationpystray- System tray integration
Edit mouse_trail_tray.pyw around line 25 to customize the trail:
self.trail_length = 13 # Number of trail segments (default: 13)
self.trail_color = '#FF33AA' # Trail color in hex (default: hot pink)
self.line_width = 7 # Trail thickness in pixels (default: 7)To start Mouse Trail automatically when Windows boots:
- Right-click
start_mouse_trail.pywand create a shortcut - Press
Win + R, typeshell:startup, and press Enter - Move the shortcut to the Startup folder that opens
MouseTrails/
├── start_mouse_trail.pyw # Main launcher (double-click this!)
├── start_tray.bat # Alternative batch launcher
├── mouse_trail_tray.pyw # Core application code
├── install_dependencies.bat # One-click dependency installer
├── requirements.txt # Python package requirements
├── QUICK_START.txt # Simple getting started guide
├── README.md # This file
├── .gitignore # Git ignore rules
└── old versions/ # Previous versions of the script
App closes immediately:
- Run
install_dependencies.batto ensure all packages are installed - An error dialog should appear if dependencies are missing
Can't find tray icon:
- Check the hidden icons area (click the up arrow ^ in system tray)
- Look for a pink circular icon
Trail doesn't appear:
- Right-click the tray icon and ensure "Toggle Trail" is checked
Need to see error messages:
- Run from command line:
python mouse_trail_tray.pyw - This will display any errors in the console
The application creates a transparent, click-through overlay window that spans all monitors. It tracks your mouse position using pyautogui and draws a fading trail effect on a tkinter canvas. The trail gradually disappears when the mouse stops moving.
Key technical features:
- Uses Windows API (
ctypes) to make the window click-through and always-on-top - Multi-threaded design separates the trail rendering from the tray icon
- Efficient canvas updates at ~60 FPS for smooth animation
- Dynamic opacity and width tapering for a natural trail effect
Free to use and modify for personal or commercial use.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
Created as a portable screen recording tool. Originally designed for demonstrating cursor movement in tutorials and presentations.
Enjoy your mouse trail! If you find this useful, please star the repository ⭐