   (persp-frame-switch name))
 
 (defun +workspace--generate-id ()
-  (or (cl-loop for name in (+workspace-list)
+  (or (cl-loop for name in (+workspace-list-names)
                when (string-match-p "^#[0-9]+$" name)
                maximize (string-to-number (substring name 1)) into max
                finally return (if max (1+ max)))

end of the workspace list."
  (interactive
   (list (or current-prefix-arg
             (completing-read "Switch to workspace: " (+workspace-list)))))
  (when (and (stringp index)
             (string-match-p "^[0-9]+$" index))
    (setq index (string-to-number index)))
  (condition-case ex
      (let ((names (+workspace-list))
            (old-name (+workspace-current-name)))
        (cond ((numberp index)
               (let ((dest (nth index names)))

(defun +workspace/kill-session ()
  "Delete the current session, clears all workspaces, windows and buffers."
  (interactive)
  (unless (cl-every #'+workspace-delete
                    (delete +workspaces-main (+workspace-list-names)))
    (+workspace-error "Could not clear session"))
  (+workspace-switch +workspaces-main t)
  (doom/kill-all-buffers)
