{"id":19442208,"url":"https://github.com/commandcracker/display-server-interactions","last_synced_at":"2025-08-18T09:33:14.019Z","repository":{"id":87110439,"uuid":"495955594","full_name":"Commandcracker/display-server-interactions","owner":"Commandcracker","description":"DSI allows you to perform basic interactions on your display server, like screenshotting a window or sending input to it.","archived":false,"fork":false,"pushed_at":"2023-03-06T12:43:47.000Z","size":113,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-07T22:10:07.556Z","etag":null,"topics":["ctypes","input","python-library","python3","screen","screen-capture","screen-recorder","screenshot"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/display-server-interactions/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Commandcracker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-24T19:09:47.000Z","updated_at":"2023-02-25T16:30:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"ed8ebf12-3c8d-435b-8d22-fbe841beac92","html_url":"https://github.com/Commandcracker/display-server-interactions","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commandcracker%2Fdisplay-server-interactions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commandcracker%2Fdisplay-server-interactions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commandcracker%2Fdisplay-server-interactions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commandcracker%2Fdisplay-server-interactions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Commandcracker","download_url":"https://codeload.github.com/Commandcracker/display-server-interactions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240626742,"owners_count":19831592,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ctypes","input","python-library","python3","screen","screen-capture","screen-recorder","screenshot"],"created_at":"2024-11-10T15:38:36.845Z","updated_at":"2025-02-25T07:44:31.492Z","avatar_url":"https://github.com/Commandcracker.png","language":"Python","readme":"# Display Server Interactions\n\n[![PyPI version](https://badge.fury.io/py/display-server-interactions.svg)](https://pypi.org/project/display-server-interactions/)\n[![Documentation Status](https://readthedocs.org/projects/display-server-interactions/badge/?version=latest)](https://display-server-interactions.readthedocs.io/en/latest)\n[![Downloads](https://pepy.tech/badge/display-server-interactions)](https://pepy.tech/project/display-server-interactions)\n[![Supported Python Versions](https://img.shields.io/pypi/pyversions/display-server-interactions)](https://pypi.org/project/display-server-interactions/)\n\n[![License](https://img.shields.io/github/license/Commandcracker/display-server-interactions)](https://github.com/Commandcracker/display-server-interactions/blob/main/LICENSE.txt)\n[![GitHub stars](https://img.shields.io/github/stars/Commandcracker/display-server-interactions)](https://github.com/Commandcracker/display-server-interactions/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/Commandcracker/display-server-interactions)](https://github.com/Commandcracker/display-server-interactions/network)\n[![GitHub issues](https://img.shields.io/github/issues/Commandcracker/display-server-interactions)](https://github.com/Commandcracker/display-server-interactions/issues)\n[![Publish](https://github.com/Commandcracker/display-server-interactions/actions/workflows/pypi-publish.yml/badge.svg)](https://github.com/Commandcracker/display-server-interactions/actions/workflows/pypi-publish.yml)\n\nDSI allows you to perform basic interactions on your display server, like screenshotting a window or sending input to it.\nCurrently, DSI only supports X11/Xorg (GNU/Linux) and Windows but it aims to be cross-platform.\n\n**WARNING: Please Do not use DSI in production, because it's currently in development!**\n\n## Quick overview\n\nLook at the [documentation](https://display-server-interactions.readthedocs.io/en/latest/) for moor information\n\n### Get a window\n\n```python\nfrom display_server_interactions import DSI\ndsi = DSI()\nwindow = dsi.get_active_window()\n```\n\n### Get basic window information\n\n```python\nprint(\"Active window: \")\nprint(\"\\tName: {}\".format(window.name))\nprint(\"\\tPID: {}\".format(window.pid))\n```\n\n### Take a screenshot of the window\n\n```python\nimport cv2\nimport numpy as np\n\nimg = np.array(window.get_image())\ncv2.imshow(f'Screenshot of \"{window.name}\"', img)\n\nwhile True:\n    if cv2.waitKey(1) \u0026 0xFF == ord('q'):\n        break\n```\n\n### Sending keys to a window\n\n```python\nwindow.send_str(\"Hello World\")\n```\n\n### Move the mouse pointer\n\n```python\nwindow.warp_pointer(x=42, y=73)\n```\n\n### Sending mouse clicks\n\n```python\nwindow.send_mouse_click(x=42, y=73)\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommandcracker%2Fdisplay-server-interactions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommandcracker%2Fdisplay-server-interactions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommandcracker%2Fdisplay-server-interactions/lists"}