Skip to content

Instantly share code, notes, and snippets.

@onyx-and-iris
Last active October 10, 2023 19:43
Show Gist options
  • Save onyx-and-iris/1204d1f371413c8c62459a5f54017104 to your computer and use it in GitHub Desktop.
Save onyx-and-iris/1204d1f371413c8c62459a5f54017104 to your computer and use it in GitHub Desktop.
Projects a source named "VSCode" in fullscreen to monitor identified by "AORUS FI27Q-X(0)"
import logging
import obsws_python as obs
logging.basicConfig(
level=logging.DEBUG,
)
def main():
with obs.ReqClient() as client:
resp = client.get_monitor_list()
for monitor in resp.monitors:
if monitor["monitorName"] == "AORUS FI27Q-X(0)":
client.open_source_projector(
"VSCode",
monitor_index=monitor["monitorIndex"],
)
break
if __name__ == "__main__":
main()
@onyx-and-iris
Copy link
Author

requires:
obsws-python
Python 3.9+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment