https://github.com/amarnaud2/anti-lock-multiplatform
Prevent your screen from locking.
https://github.com/amarnaud2/anti-lock-multiplatform
beta-testing first-project linux macos mouse-emulation windows
Last synced: 6 months ago
JSON representation
Prevent your screen from locking.
- Host: GitHub
- URL: https://github.com/amarnaud2/anti-lock-multiplatform
- Owner: amarnaud2
- License: mit
- Created: 2025-05-06T09:56:30.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-05-06T10:57:16.000Z (8 months ago)
- Last Synced: 2025-05-07T04:33:00.084Z (8 months ago)
- Topics: beta-testing, first-project, linux, macos, mouse-emulation, windows
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# ๐ป Anti-Lock Script โ Multi-platform Mouse Jiggler
[](https://github.com/amarnaud2/anti-lock/actions/workflows/build-multiplatform.yml)
[](LICENSE)
---
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.
---
## ๐ Sponsor this project
If you find this project useful, consider supporting it ๐
[](https://www.buymeacoffee.com/amarnaud2)
[](https://ko-fi.com/amarnaud2)
[](https://paypal.me/arnaud2m)
## ๐ฆ Supported Platforms
| Platform | Format | Built with |
|----------|----------------|----------------------|
| Windows | `.exe` | PyInstaller |
| macOS | `.app` / `.dmg`| py2app |
| Linux | `.deb` / `.rpm`| PyInstaller + FPM |
## ๐ How It Works
Every 60 seconds, the script moves the mouse by 1 pixel and back, preventing screen lock due to inactivity.
## ๐ง How to Use
Download the appropriate binary from the [Releases](https://github.com/amarnaud2/anti-lock-multiplatform/releases) section, then run it:
- **Windows**: Double-click `anti_lock.exe`
- **macOS**: Unzip and launch the `.app`. May require `System Preferences > Security > Allow Anyway`.
- **Linux**: Install with `sudo dpkg -i` or `sudo rpm -i`
## ๐ป Manual Usage (Python Script)
You can also run the Python script directly:
```bash
pip install pyautogui
python anti_lock.py
To stop the script, press Ctrl+C.
```
## ๐ ๏ธ Build Locally
### Windows (via GitHub Actions or manually)
```bash
pip install pyinstaller
pyinstaller --onefile --windowed anti_lock.py
```
### macOS (Apple Silicon)
```bash
pip install py2app
python setup.py py2app
```
### Linux (Debian/Redhat)
```bash
sudo 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 pkg
```
### ๐ค CI/CD with GitHub Actions
This 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.
## ๐งช Local Development Setup (macOS M1 compatible)
### 1. Clone this repository
```bash
git clone https://github.com/amarnaud2/anti-lock-multiplatform.git
cd anti-lock-multiplatform
```
### 2. Create a virtual environment
```bash
python3 -m venv .venv
```
### 3. Activate the virtual environment
```bash
source .venv/bin/activate
```
### 4. Install dependencies
```bash
pip install -r requirements.txt
```
### 5. Run the script
```bash
python anti_lock.py
```
### 6. Deactivate the virtual environment
```bash
deactivate
```
---
## โ Support
If youโd like to say thanks or help keep this project going:
- ๐ [Buy Me a Coffee](https://www.buymeacoffee.com/amarnaud2)
- ๐ [Ko-fi](https://ko-fi.com/amarnaud2)
- ๐ณ [PayPal](https://paypal.me/arnaud2m)
Every contribution helps โ thank you!
## ๐ License
MIT License โ free to use, modify and distribute.