Get first kernel by default

I am creating an extension, which creates a notebook and opens it. When opening it with:

   commands.execute('docmanager:open', {path: newnotebook.path});

I get the kernel selection popup, how could I make jupyter select the first available kernel? From the documentation KernelManager | @jupyterlab but I cant figure out how to connect without getting this pop up.

Thank you very much :slight_smile: :slight_smile: