Skip to content

Instantly share code, notes, and snippets.

@hedning
hedning / gnome-shell-record.py
Created January 18, 2020 14:21
Start gnome shell screen cast from command line
#!/usr/bin/env nix-shell
#! nix-shell -i python3 -p python3.pkgs.dbus-python
import dbus
import time
bus = dbus.SessionBus()
obj = bus.get_object("org.gnome.Shell", "/org/gnome/Shell/Screencast")
obj.Screencast("Auto %d %t.webm", [],
dbus_interface="org.gnome.Shell.Screencast")