first commit
This commit is contained in:
16
backends/spectacle.py
Normal file
16
backends/spectacle.py
Normal 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
|
||||
Reference in New Issue
Block a user