diff --git a/README.md b/README.md index 7778748..0271915 100644 --- a/README.md +++ b/README.md @@ -549,9 +549,13 @@ obsws-cli projector list-monitors - --monitor-index: Index of the monitor to open the projector on. - defaults to 0 + *optional* - args: + - defaults to current scene ```console +obsws-cli project open + obsws-cli projector open --monitor-index=1 "Scene" ``` diff --git a/obsws_cli/__about__.py b/obsws_cli/__about__.py index 70914ae..85dd476 100644 --- a/obsws_cli/__about__.py +++ b/obsws_cli/__about__.py @@ -1,4 +1,4 @@ # SPDX-FileCopyrightText: 2025-present onyx-and-iris # # SPDX-License-Identifier: MIT -__version__ = "0.13.0" +__version__ = "0.13.1" diff --git a/obsws_cli/projector.py b/obsws_cli/projector.py index ac69f11..7b62f3c 100644 --- a/obsws_cli/projector.py +++ b/obsws_cli/projector.py @@ -45,13 +45,21 @@ def list_monitors(ctx: typer.Context): @app.command('open | o') def open( ctx: typer.Context, - source_name: str, monitor_index: Annotated[ int, typer.Option(help='Index of the monitor to open the projector on.'), ] = 0, + source_name: Annotated[ + str, + typer.Argument( + help='Name of the source to project. (optional, defaults to current scene)' + ), + ] = '', ): """Open a fullscreen projector for a source on a specific monitor.""" + if not source_name: + source_name = ctx.obj.get_current_program_scene().scene_name + ctx.obj.open_source_projector( source_name=source_name, monitor_index=monitor_index,