Skip to content

Instantly share code, notes, and snippets.

@kode54
Created March 18, 2023 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kode54/041bd92ea2a167097e32be32fcf2b2ef to your computer and use it in GitHub Desktop.
Save kode54/041bd92ea2a167097e32be32fcf2b2ef to your computer and use it in GitHub Desktop.
OBS Recording Toggle, based on obs-wayland-shortcuts, but using obs-cli and not obs-cli-leafac.
#!/usr/bin/env python3
# Original Author: Andrew Shark
# Homepage: https://gitlab.com/AndrewShark/obs-wayland-shortcuts
# License: GPLv3
# Modified By: Christopher Snowhill
# This script is made for convenience. It is invoked by a logid gesture for MX Master mouse.
# It also works when invoked by a keyboard shortcut from your preferred Wayland compositor/desktop environment.
import subprocess
obs_cli = "/usr/bin/obs-cli"
obs_password = "<your password here>"
p2_result = subprocess.run([obs_cli, "--password", obs_password, "recording", "toggle"], capture_output=True).stdout
print(p2_result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment