;;; eaf-settings.el --- eaf settings  -*- lexical-binding: t -*-

;;; Commentary:
;; https://www.emacswiki.org/emacs/EmacsApplicationFramework
;; https://github.com/manateelazycat/emacs-application-framework

;;; Code:
;; required by eaf
(use-package epc
  :load-path (lambda() (concat config-dir "lisp/epc"))
  :defer t)

(use-package eaf
  :load-path (lambda() (concat config-dir "lisp/emacs-application-framework"))
  ;;:after (org)  ;; eaf requires eaf-interleave requires org
  ;;:defer 2
  :commands (eaf-open
             eaf-open-browser
             eaf-open-browser-with-history
             eaf-open-mail-as-html
             eaf-open-camera
             eaf-open-terminal
             eaf-file-sender-qrcode eaf-file-sender-qrcode-in-dired
             eaf-file-browser-qrcode
             eaf-open-airshare
             eaf-open-rss-reader
             eaf-open-mindmap eaf-create-minmap
             eaf-open-office
             eaf-open-demo)
  ;;  :unless (string= (system-name) "hasp138dw")
  ;;:when (if (require 'dbus) (dbus-ping :session "org.freedesktop.Notifications"))
  :if my-dbusp  ;; EAF use DBus' session bus, it must run by a general user (DO NOT USE as root).
  :config
  (eaf-setq eaf-browser-enable-adblocker "true")
  (setq eaf-find-alternate-file-in-dired t)
  (setq eaf-config-location (concat user-cache-directory "eaf/")))

(provide 'eaf-settings)
;;; eaf-settings.el ends here
