controllers

This commit is contained in:
Jing Hua
2023-11-02 11:10:55 +08:00
parent 824a9068e5
commit fd3787ee28
4 changed files with 83 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
from fabric import Connection
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()