I have enabled dotspacemacs-auto-resume-layouts in .spacemacs file. I created a new layout named acme and quit spacemacs.
Now when I start spacemacs again, I am presented with the default screen (showing the spacemacs banner and recent projects and files). I have to switch to the layout I want using SPC l 2.

Is there a way I can tell spacemacs to load the acme layout by default? Or maybe programmatically switch to the layout by adding some function calls in user-config part of .spacemacs?

  • I have also tried adding (persp-switch 'acme) to .spacemacs but it throws an error
    – Ashish
    Jun 23, 2022 at 6:22
  • Where did you add? dotspacemacs/user-config? Jun 23, 2022 at 7:02
  • @TianshuWang Yes. In the file .spacemacs, function dotspacemacs/user-config. I got the error "Error in dotspacemacs/user-config: Wrong type argument: hash-table-p, nil"
    – Ashish
    Jun 23, 2022 at 7:29

1 Answer 1


Try to put the following in your user-config, Though I don't know why it open *scratch* buffer

(add-hook 'persp-mode-hook
            (lambda ()
              (persp-switch "@Spacemacs")))
  • This didn't work @tianshu
    – Ashish
    Jul 20, 2022 at 5:00
  • 1
    The combination of setting dotspacemacs-auto-resume-layouts to t in dotspacemacs/init and adding the hook you mentioned works great for me. Thank you! Oct 6, 2022 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.