This Python program creates a screensaver that locks the screen and prevents the system from going to sleep. It also moves the cursor to random positions on the screen at regular intervals.
- Saves display resources and elecctricity by turning off the backlight and screen
- Fullscreen mode with hidden cursor
- Customizable text display
- Cursor movement to random positions at regular intervals
- Prevents system from sleeping
- Handles Ctrl+H to exit the application
- Ignores Home button press
- Python 3.x
tkinter
modulexdotool
utilityxset
utility
- Install Python 3.x if not already installed.
- Ensure
tkinter
,xdotool
, andxset
are installed on your system.
- Clone the repository:
git clone https://github.com/aronbergman/screensaver_linux.git cd screensaver_linux
- Run the program:
If screen dimensions are not provided, the program will detect them automatically.
python locker.py
- The program creates a fullscreen Tkinter window with a hidden cursor.
- A label with custom text (currently empty) is displayed.
- The cursor is moved to random positions on the screen every 55 seconds.
- The system is prevented from sleeping by calling
xset
regularly. - The program handles Ctrl+H to exit and ignores Home button presses.
- To customize the displayed text, modify the
text
variable in thelocker.py
file. - Adjust the cursor movement interval by changing the
time.sleep(55)
value in themove_cursor
function.
This project is licensed under the MIT License. See the LICENSE file for details.
Special thanks to the contributors and maintainers of the libraries and utilities used in this project.
Feel free to update and expand this README as necessary.