;; inspiration from: https://github.com/aartaka/nyxt-config/blob/master/config.lisp

(in-package :nyxt-user)

;; search engines
(defvar *my-search-engines*
  (list
   '("wiki" "https://en.wikipedia.org/w/index.php?search=~a" "https://en.wikipedia.org/")
   '("kagi" "https://kagi.com/search?q=~a" "https://www.kagi.com/")))

(define-configuration browser
    ((restore-session-on-startup-p t)
     ;;(default-new-buffer-url (quri:uri "https://github.com/atlas-engineer/nyxt"))
     (external-editor-program '("emacsclient -r"))))

(define-configuration context-buffer
  "Go through the search engines above and make-search-engine"
  ((search-engines
    (append %slot-default%
            (mapcar
             (lambda (engine) (apply 'make-search-engine engine))
             *my-search-engines*)))))

;; auto bookmark frequently visited sites
(define-configuration bookmark-frequent-visits-mode
    ((threshold 10)))

(define-configuration hint-mode
  "Set up QWERTY home row as the hint keys."
  ((hints-alphabet "DSJKHLFAGNMXCWEIO")))

(define-nyxt-user-system-and-load "nyxt-user/rbw"
  :depends-on ("nx-rbw"))

(define-configuration :password-mode
    ((pasword-interface (make-instance 'nx-rbw:rbw-interface))))



;; key binds
;; (defvar mnl-keys (make-keyscheme cua))
