Adapt for Windows os; Refine README

This commit is contained in:
Timothyxxx
2023-11-27 00:29:09 +08:00
parent 6dee58252e
commit 8c0525c20e
6 changed files with 66 additions and 84 deletions

View File

@@ -1,9 +1,11 @@
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:
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()
return result.stdout.strip()