 (defvar boop-plugins-dir (expand-file-name (concat (getenv "HOME") "/.boopelplugins"))
   "The default directory to read plugins from.")
 
+(defvar boop-configs nil "A list of config boop groups")
 (defvar boop-config-alist nil
   "The main alist of scripts and the arguments to run them with.
 

  "Synchronizes the result alist to contain only items in the config alist."
  (setq boop-result-alist (--filter (assoc (car it) boop-config-alist) boop-result-alist)))

(defun boop--handle-result (id result)
  "Update the resut with ID by handling the RESULT of the async `shell-command-to-string`."
  (if (assoc id boop-result-alist)
      (boop--update-result id result)
    (setq boop-result-alist (append (list (cons id result)) boop-result-alist))))

(defun boop--update-result (id result)
  "Update the boop with ID to have the new RESULT.

Updating the result will also trigger any actions associated with that RESULT form."
  (let* ((current-result (cdr (assoc id boop-result-alist)))
         (form (or (cdr (assoc result boop-format-alist))
                   boop-default-format))
         (name (car (assoc id boop-result-alist)))
         (action (plist-get form :action)))
    (setf (cdr (assoc id boop-result-alist)) result)
    (when (and (not (eq current-result result)) action)
      (funcall (if (symbolp action)
                   (symbol-function action)

    (setq boop--format-result-func 'boop--format-result-as-id)
    (run-at-time "2 sec" nil `(lambda () (setq boop--format-result-func (quote ,previous-format-func))))))

(defun boop (id status &optional group)
  "Manually boop something and set ID to have a status of STATUS."
  (if (assoc id boop-result-alist)
      (boop--update-result id status)
    (progn
      ;; Add the new boop to the config and results
      (setq boop-config-alist (append (list (list id :group group)) boop-config-alist))
      (setq boop-result-alist (append (list (list id :result status :group group)) boop-result-alist)))))

(defun deboop (&optional id)
  "Remove boop with ID from `boop-config-alist` and sync with the results."
