Skip to content

Instantly share code, notes, and snippets.

@lissyx
Created April 16, 2024 05:25
Show Gist options
  • Save lissyx/246041e02dd27aff8425dced4181dbf2 to your computer and use it in GitHub Desktop.
Save lissyx/246041e02dd27aff8425dced4181dbf2 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