Is it possible to trigger opus commands directly when opening a specific lister?

I have a saved lister to open my downloads folder in a dual file display.

Is it possible to automatically execute an opus command when opening the window (in my case to automatically select the newest files in the downloads folder)?
I know it's possible with a script where I hard code it, but I'd prefer a simpler option if available.

You'd need to use scripting.

  • OnOpenLister [Directory Opus Manual] lets your script do things in reaction to new windows opening.

  • Lister [Directory Opus Manual] has a layout property which you can use to know if the new window came from your special layout. (Or you could check which folders are loaded into the lister's tabs, etc., depending on how you want it to work.)

If you want it to happen for specific folders rather than layouts, there's already a script you can use/adapt for that: