Created
March 18, 2023 00:19
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |
That script you linked to also supports a configuration file in your home directory for port/username/password, per the Python interface library it uses to talk to OBS.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This didn't work for me on Manjaro. The obs_cli is outdated.
What Worked:
(change the password and the port on the above command)