 (defun +circe-buffer-p (buf)
   "Return non-nil if BUF is a `circe-mode' buffer."
   (with-current-buffer buf
-    (and (derived-mode-p 'circe-mode)
-         (eq (safe-persp-name (get-current-persp))
-             +irc--workspace-name))))
+    (derived-mode-p 'circe-mode)))
 
 ;;;###autoload
 (defun +irc--add-circe-buffer-to-persp-h ()
-  (when (bound-and-true-p persp-mode)
+  (when (and (bound-and-true-p persp-mode)
+             (+workspace-exists-p +irc--workspace-name))
     (let ((persp (get-current-persp))
           (buf (current-buffer)))
       ;; Add a new circe buffer to irc workspace when we're in another workspace


;;;###autoload
(defun +irc/tracking-next-buffer ()
  "Dissables switching to an unread buffer unless in the irc workspace."
  (interactive)
  (when (derived-mode-p 'circe-mode)
    (tracking-next-buffer)))

(defun +irc/quit ()
  "Kill current circe session and workgroup."
  (interactive)
  (unless (y-or-n-p "Really kill IRC session?")
    (user-error "Aborted"))
  (let (circe-channel-killed-confirmation
        circe-server-killed-confirmation)
    (when +irc--defer-timer
      (cancel-timer +irc--defer-timer))
    (disable-circe-notifications)
    (mapc #'kill-buffer (doom-buffers-in-mode 'circe-mode (buffer-list) t))
    (when (featurep! :ui workspaces)
      (when (equal (+workspace-current-name) +irc--workspace-name)
        (+workspace/delete +irc--workspace-name)))))

;;;###autoload
(defun +irc/ivy-jump-to-channel (&optional this-server)
