The only thing I am not sure about here is at what exact point the
startupHook should get run. I picked a place that seems to make sense:
as late as possible, right before entering the main loop. That way all
the layouts/workspaces/other state are set up and the startupHook can
manipulate them.