first commit

This commit is contained in:
2026-03-06 13:24:50 +05:30
commit 8715ebafe8
8 changed files with 83 additions and 0 deletions

16
backends/spectacle.py Normal file
View File

@@ -0,0 +1,16 @@
import os
import subprocess
from screenshot_backend import register_backend, ScreenshotBackend
@register_backend
class SpectacleBackend(ScreenshotBackend):
def supports(self) -> bool:
return "KDE" in os.environ.get("XDG_CURRENT_DESKTOP", "")
def active_window(self) -> str:
path = "hgot.png"
print("Running")
subprocess.run(["spectacle", "-a", "-b", "-n", "-o", path])
return path