This Python utility prevents your screen from locking by simulating a small mouse movement every 60 seconds.
It's available for Windows, macOS (Apple Silicon), and Linux (.deb / .rpm) via GitHub Releases.
If you find this project useful, consider supporting it 🙏
| Platform | Format | Built with |
|---|---|---|
| Windows | .exe |
PyInstaller |
| macOS | .app / .dmg |
py2app |
| Linux | .deb / .rpm |
PyInstaller + FPM |
Every 60 seconds, the script moves the mouse by 1 pixel and back, preventing screen lock due to inactivity.
Download the appropriate binary from the Releases section, then run it:
- Windows: Double-click
anti_lock.exe - macOS: Unzip and launch the
.app. May requireSystem Preferences > Security > Allow Anyway. - Linux: Install with
sudo dpkg -iorsudo rpm -i
You can also run the Python script directly:
pip install pyautogui
python anti_lock.py
To stop the script, press Ctrl+C.pip install pyinstaller
pyinstaller --onefile --windowed anti_lock.pypip install py2app
python setup.py py2appsudo apt install ruby ruby-dev build-essential rpm
sudo gem install fpm
pip install pyinstaller
pyinstaller --onefile anti_lock.py
fpm -s dir -t deb -n anti_lock -v 1.0.0 -C pkg
fpm -s dir -t rpm -n anti_lock -v 1.0.0 -C pkgThis repository includes a GitHub Actions workflow that:
- Builds the script for all major platforms.
- Publishes artifacts to GitHub Releases when a tag like v1.0.0 is pushed.
git clone https://github.com/amarnaud2/anti-lock-multiplatform.git
cd anti-lock-multiplatformpython3 -m venv .venvsource .venv/bin/activatepip install -r requirements.txtpython anti_lock.pydeactivateIf you’d like to say thanks or help keep this project going:
- 💛 Buy Me a Coffee
- 💙 Ko-fi
- 💳 PayPal
Every contribution helps — thank you!
MIT License – free to use, modify and distribute.