This Python project uses the PyQt5 library to create a simple, topmost overlay window with specified text. This overlay window is frameless and has a translucent background. It can be used to display brief notifications or messages on the desktop.
- Overlay Window: Creates a simple, translucent overlay window with the specified text.
- Timer: The window will auto-close after the specified amount of seconds.
- Multi-processing: The window can be displayed in a separate process.
- Update Text: Use OverlayController to update text.
write_to_screen(text, timer, queue=None) -> OverlayController
: Initializes a QApplication, creates an OverlayWindow, and starts the app's event loop.write_to_screen_process(text, timer) -> None
: Starts thewrite_to_screen
function in a separate process.
from screen_writer import write_to_screen
# Display "Hello, world!" for 5 seconds
write_to_screen("Hello, world!", 5)
time.sleep(2)
from screen_writer import write_to_screen
# Return ControlOverlay object to interact with the window
overlay_controller = write_to_screen("Hello, world!", 60, True)
time.sleep(2)
overlay_controller.write("Goodbye, world!")
time.sleep(2)
overlay_controller.exit()
This project requires PyQt5. Install it with pip:
pip install PyQt5
Install via pip:
pip install --upgrade git+https://github.com/saltchicken/screen_writer
Remember, this is a simple GUI application. There are endless possibilities for what you can do by extending the provided classes or adding new features. Happy coding!