       (doom-popup-mode +1)
       (when (and (plist-get plist :autofit)
                  (not (string-empty-p (buffer-string))))
+        ;; TODO calculated window-width/window-height alternative
         (let ((max-size (plist-get plist :size)))
           (fit-window-to-buffer window max-size nil max-size))))
     window))


      ;; Hide modeline in org-agenda
      (add-hook 'org-agenda-finalize-hook #'doom-hide-modeline-mode)
      ;; Don't monopolize frame!
      (advice-add #'org-agenda :around #'doom*suppress-delete-other-windows)
      ;; ensure quit keybindings work propertly

          ("^\\*ftp " :noselect t :autokill t :noesc t)
          ;; doom
          ("^\\*doom:scratch" :regexp t :size 12 :noesc t :select t :modeline t :autokill t :static t)
          ("^\\*doom:" :regexp t :size 0.35 :noesc t :select t)
          ("^ ?\\*doom " :regexp t :noselect t :autokill t :autoclose t :autofit t)
          ;; built-in (emacs)
          ("*ert*" :same t :modeline t)
          ("*info*" :size 0.5 :select t :autokill t)
          ("*Backtrace*" :size 20 :noselect t)
          ("*Warnings*"  :size 12 :noselect t :autofit t)
          ("*Messages*"  :size 12 :noselect t)
          ("*Help*" :size 0.3)
          ("^\\*.*Shell Command.*\\*$" :regexp t :size 20 :noselect t :autokill t)
