This commit is contained in:
Matt Nish-Lapidus 2025-03-03 14:56:05 -05:00
parent 5b12fcebf9
commit 04c1b47619
8 changed files with 278 additions and 73 deletions

View file

@ -0,0 +1,45 @@
(in-package #:nyxt-user)
;;; Reset ASDF registries to allow loading Lisp systems from
;;; everywhere.
#+nyxt-3 (reset-asdf-registries)
(define-configuration browser
((theme default)))
;; Ad block
(define-configuration :web-buffer
((default-modes
(pushnew 'nyxt/mode/blocker:blocker-mode %slot-value%))))
;; search engine
(defvar *my-search-engines*
(list
'("kagi" "https://kagi.com/search?q=~a" "https://www.kagi.com/")
'("wiki" "https://en.wikipedia.org/w/index.php?search=~a" "https://en.wikipedia.org/")))
(define-configuration :buffer
((search-engines (append (mapcar (lambda (engine) (apply 'make-search-engine engine))
*my-search-engines*)
%slot-default%))))
;; keybindings: small emacs experience in CUA (default mode) of Nyxt
(define-configuration buffer
((override-map (let ((map (make-keymap "override-map")))
(define-key map
"C-space" 'noop
"M-x" 'execute-command
"C-n" 'nyxt/web-mode:scroll-down
"C-p" 'nyxt/web-mode:scroll-up
"C-f" 'nyxt/web-mode:scroll-right
"C-b" 'nyxt/web-mode:scroll-left
"C-g" 'query-selection-in-search-engine
"M-s->" 'nyxt/web-mode:scroll-to-bottom
"M-s-<" 'nyxt/web-mode:scroll-to-top
"C-s" 'nyxt/web-mode:search-buffer
"M-w" 'nyxt/web-mode:copy
"C-y" 'nyxt/web-mode:paste
"C-Y" 'nyxt/web-mode:paste-from-clipboard-ring)))))
;; (define-configuration bookmark-frequent-visits-mode
;; ((threshold 10)))