Skip to content

saltchicken/screen_writer

Repository files navigation

Screen Writer

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.

Features

  • 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.

How to Use

Function Definitions

  1. write_to_screen(text, timer, queue=None) -> OverlayController: Initializes a QApplication, creates an OverlayWindow, and starts the app's event loop.
  2. write_to_screen_process(text, timer) -> None: Starts the write_to_screen function in a separate process.

Example Usage

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()

Installation

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!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages