playing with nyxt

This commit is contained in:
Matt Nish-Lapidus 2025-03-05 14:37:54 -05:00
parent d878a0f33c
commit b994d25b52
2 changed files with 33 additions and 18 deletions

View file

@ -0,0 +1,23 @@
(defmethod customize-instance ((buffer buffer) &key)
(setf (slot-value buffer 'default-modes
'(nyxt/mode/certificate-exception:certificate-exception-mode
nyxt/mode/autofill:autofill-mode
nyxt/mode/spell-check:spell-check-mode
nyxt/mode/search-buffer:search-buffer-mode
nyxt/mode/hint:hint-mode nyxt/mode/document:document-mode
nyxt/mode/password:password-mode
nyxt/mode/bookmark:bookmark-mode
nyxt/mode/annotate:annotate-mode
nyxt/mode/history:history-mode
nyxt/mode/blocker:blocker-mode
nyxt/mode/reduce-tracking:reduce-tracking-mode
nyxt/mode/bookmarklets:bookmarklets-mode base-mode))))
(define-configuration (web-buffer)
((default-modes (pushnew 'nyxt/mode/style:dark-mode %slot-value%))))
(define-configuration (input-buffer)
((default-modes (pushnew 'nyxt/mode/vi:vi-normal-mode %slot-value%))))
(define-configuration (prompt-buffer)
((default-modes (pushnew 'nyxt/mode/vi:vi-insert-mode %slot-value%))))

View file

@ -8,10 +8,6 @@
'("wiki" "https://en.wikipedia.org/w/index.php?search=~a" "https://en.wikipedia.org/") '("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/"))) '("kagi" "https://kagi.com/search?q=~a" "https://www.kagi.com/")))
(defvar *web-buffer-modes*
'(:blocker-mode
:reduce-tracking-mode))
(define-configuration browser (define-configuration browser
((restore-session-on-startup-p t) ((restore-session-on-startup-p t)
;;(default-new-buffer-url (quri:uri "https://github.com/atlas-engineer/nyxt")) ;;(default-new-buffer-url (quri:uri "https://github.com/atlas-engineer/nyxt"))
@ -29,21 +25,17 @@
(define-configuration bookmark-frequent-visits-mode (define-configuration bookmark-frequent-visits-mode
((threshold 10))) ((threshold 10)))
;; set web buffer default modes from *web-buffer-modes* above
(define-configuration web-buffer
"Basic modes setup for web-buffer."
((default-modes `(,@*web-buffer-modes* ,@%slot-value%))))
(define-configuration hint-mode (define-configuration hint-mode
"Set up QWERTY home row as the hint keys." "Set up QWERTY home row as the hint keys."
((hints-alphabet "DSJKHLFAGNMXCWEIO"))) ((hints-alphabet "DSJKHLFAGNMXCWEIO")))
(define-configuration prompt-buffer (define-nyxt-user-system-and-load "nyxt-user/rbw"
((hide-single-source-header-p :depends-on ("nx-rbw"))
t
:doc "This is to hide the header is there's only one source. (define-configuration :password-mode
There also used to be other settings to make prompt-buffer a bit ((pasword-interface (make-instance 'nx-rbw:rbw-interface))))
more minimalist, but those are internal APIs :(")))
;; key binds ;; key binds
;; (defvar mnl-keys (make-keyscheme cua)) ;; (defvar mnl-keys (make-keyscheme cua))