Automatically expand first level row

Is there a way to automatically expand first level row, but not expand everything, when focusing?

And when unfocusing, collapse everything except for first level.

The reason why i want this is because its troublesome to keep collapsing and uncollapsing. I want a beautiful, easy to see outline. I don’t want to unfocus and come back to a myriad of rows, that i have to reorient myself.

okay, nvm, after some thinking i was able to do the above with keyboard maestro.

Hello Ryan!

May I ask you how you did it? Would you like to share?

Kindest regards
/Gus