-
-
Save brubrant/33fc239f90dc1ba796a1919f2396f353 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 hidden or 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) |
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:
Enabled websocket on OBS
Instaled this lib using pipx: https://github.com/pschmitt/obs-cli
Added this command on my wayland custom shortcuts: obs-cli -p -P record toggle
(change the password and the port on the above command)