Conditional Script Based on DOpus Environment State

Is there a way to perform one action or another based on the state of the current lister environment?

Specifically, I want to set a hotkey (Numpad /) to toggle the lister between Flat View + Details + Custom Columns versus List View (Standard).

I figured out the way to get to the flat view (et al), but I'd like to press the same button to toggle.

Thanks

OK, I guess it wasn't the way I expected to solve my problem (hence it's kind of off-topic from the title) but I figured out a way to do what I intended to do in the first place.

I went to Preferences -> Folders -> Folder Formats and changed the default "Flat View" format to what I preferred. Then I set a hotkey to "Set FLATVIEW=Toggle," and it works pretty well.

The only issue I have is that in the Flat View, it still shows some columns (Modified, Attr, Type) that I specifically removed from the Flat View default format (in Flat View - Edit Format -> Columns listview). What am I doing wrong? Is it inheriting a setting from elsewhere?

Also, I've gathered that my original question is probably not possible right now in DOpus 9, but it would be a nice feature.

Did you read the folder FAQ?

[Folder Formats: Quick Guide)

I turned off the "include folders from other matching formats" checkbox.

Thank you.