                         workgroup
                         (format " %s %s " (doom--num-to-unicode (1+ index)) (wg-workgroup-name workgroup))
                         'wg-current-workgroup-p)))
-                   (wg-workgroup-list))))
+                   (wg-session-workgroup-list it))))
       (if return-p
           output
         (message "%s%s" output (or message ""))))))

  "Kill all other workgroups."
  (interactive)
  (let (workgroup (wg-current-workgroup))
    (dolist (w (wg-workgroup-list))
      (unless (wg-current-workgroup-p w)
        (wg-kill-workgroup w)))))


  "Create a new workgroup. If BANG, overwrite any workgroup named NAME."
  (interactive "<!><a>")
  (unless name
    (setq name (format "#%s" (1+ (length (wg-session-workgroup-list (wg-current-session t)))))))
  (let ((new-wg (wg-get-workgroup name t)))
    (when (and new-wg bang)
      (wg-delete-workgroup new-wg)
