DSI allows you to perform basic interactions on your display server, like screenshotting a window or sending input to it.
Project description
Display Server Interactions
DSI allows you to perform basic interactions on your display server, like screenshotting a window or sending input to it. Currently, DSI only supports X11/Xorg (GNU/Linux) but it aims to be cross-platform.
WARNING: Please Do not use DSI in production, because it's currently in development!
Quick overview
Look at the documentation for moor information's
Get a window
from display_server_interactions import DSI
dsi = DSI()
window = dsi.get_active_window()
Get basic window information
print("Active window: ")
print("\tName: {}".format(window.name))
print("\tPID: {}".format(window.pid))
Take a screenshot of the window
import cv2
import numpy as np
img = np.array(window.get_image())
cv2.imshow(f'Screenshot of "{window.name}"', img)
while True:
if cv2.waitKey(1) & 0xFF == ord('q'):
break
Sending keys to a window
window.send_str("Hello World")
Move the mouse pointer
window.warp_pointer(x=42, y=73)
Sending mouse clicks
window.send_mouse_click(x=42, y=73)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for display-server-interactions-0.0.dev3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 335da40a0706f9c22440730046d5f2c137b3a802774530d6fced143dcdb3558a |
|
MD5 | d0e80127def1e14df65babc30e32b5a7 |
|
BLAKE2b-256 | 201f310a6eed9e86e97b71152e67b996c5aca2aa1c6acfbf94429bbe817325c3 |
Close
Hashes for display_server_interactions-0.0.dev3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 327471fcc9788bde12942e926bd9ed3dd5a07a2d0b5ce3e79cbbe59ede9009cc |
|
MD5 | 50cec1f7b6e9f26741c1f1c12e89b08c |
|
BLAKE2b-256 | 565d7a271adc72c030fc34692faa92ad7b1e97cf8337fcf64d55dbccba87abb2 |