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,14 +8,10 @@
'("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/")))
(defvar *web-buffer-modes*
'(:blocker-mode
:reduce-tracking-mode))
(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"))))
((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"
@ -29,21 +25,17 @@
(define-configuration bookmark-frequent-visits-mode
((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
"Set up QWERTY home row as the hint keys."
((hints-alphabet "DSJKHLFAGNMXCWEIO")))
(define-configuration prompt-buffer
((hide-single-source-header-p
t
:doc "This is to hide the header is there's only one source.
There also used to be other settings to make prompt-buffer a bit
more minimalist, but those are internal APIs :(")))
(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))