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.
I hacked this in myself with a new command
obs-cmd current
which implements thecurrent_program_scene
method, I can PR it if you'd merge it, but I think it'd be better suited under thescene
sub-command, or even better as an argument where appropriate.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.