Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to query for current scene #62

Open
luthes opened this issue Oct 27, 2024 · 1 comment
Open

Ability to query for current scene #62

luthes opened this issue Oct 27, 2024 · 1 comment

Comments

@luthes
Copy link

luthes commented Oct 27, 2024

I hacked this in myself with a new command obs-cmd current which implements the current_program_scene method, I can PR it if you'd merge it, but I think it'd be better suited under the scene sub-command, or even better as an argument where appropriate.

        Commands::Current => {
            let res = client.scenes().current_program_scene().await;
            println!("Result: {:?}", res);
        }

This is useful for using groups across multiple OBS scenes. ie, I have Mic/Camera in a group that I reuse across scenes, so then I can just do a obs-cmd scene-item toggle "$(obs-cmd current)" "group-mic-webcam" rather than having to have a specific command for each scene. I also hav eto do some ugly formatting with Sed in case you're wondering about the output, not too familiar with Rust.

@luthes luthes changed the title Implemenet Current Scene Ability to query for current scene Oct 27, 2024
@grigio
Copy link
Owner

grigio commented Oct 27, 2024

If you make a PR I could merge it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants