Skip to content

Instantly share code, notes, and snippets.

@lissyx
Created March 26, 2024 13:01
Show Gist options
  • Save lissyx/5cc0923695768c311b65c8a4d2bb5109 to your computer and use it in GitHub Desktop.
Save lissyx/5cc0923695768c311b65c8a4d2bb5109 to your computer and use it in GitHub Desktop.
import os
import dbus
import time
session_bus = dbus.SessionBus()
session_bus.call_blocking(
'org.gnome.Shell.Screencast',
'/org/gnome/Shell/Screencast',
'org.gnome.Shell.Screencast',
'Screencast',
signature='sa{sv}',
args=[os.path.join(os.environ.get("ARTIFACT_DIR", ""), "video_%d_%t.webm"), {'draw-cursor':True, 'framerate': 35}],
)
while True:
time.sleep(30)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment