Files
sci-gui-agent-benchmark/desktop_env/controllers/xdotool.py
2023-11-27 00:29:09 +08:00

12 lines
373 B
Python

from fabric import Connection
from typing import List
class XDoToolController:
def __init__(self, ssh_connection: Connection):
self.ssh_connection = ssh_connection
def _execute_xdotool_command(self, command: List[str]) -> None:
result = self.ssh_connection.run(f"DISPLAY=:0 xdotool {command}", hide=True)
return result.stdout.strip()