config. nyxt browser

This commit is contained in:
rob 2024-04-15 23:23:11 -04:00
parent 86423f3a21
commit 8e46846a7e
2 changed files with 110 additions and 0 deletions

84
nyxt/config.lisp Normal file
View file

@ -0,0 +1,84 @@
(in-package #:nyxt-user)
;; modo de teclado
(define-configuration (web-buffer prompt-buffer panel-buffer
nyxt/mode/editor:editor-buffer)
((default-modes
(pushnew 'nyxt/mode/vi:vi-normal-mode %slot-value%))))
(define-configuration input-buffer
((override-map (let ((map (make-keymap "override-map")))
(define-key map
"C-q" 'quit
"C-w" 'buffers-panel
"C-a" 'annotate-current-url
"C-s" 'view-source-with-external-editor)))))
;; visualizar fuente de url
(define-configuration browser
((external-editor-program (list "/usr/local/bin/st" "-e" "/usr/bin/vis"))))
;; motor de búsqueda preterminado
(define-configuration browser
((default-new-buffer-url (quri.uri:uri "https://www.qwant.com"))))
;; directorio de descargas y marcadores
(define-configuration buffer
((download-path (make-instance 'download-data-path :dirname "~/Downloads")))
(bookmarks-path
(make-instance 'bookmarks-data-path :basename
"~/.local/share/nyxt/bookmarks.lisp")))
;; bloqueadores
(define-configuration (web-buffer)
((default-modes
(pushnew 'nyxt/mode/blocker:blocker-mode %slot-value%))))
(define-configuration (web-buffer)
((default-modes
(pushnew 'nyxt/mode/reduce-tracking:reduce-tracking-mode %slot-value%))))
;; esquema de colores - punk_coders
(define-configuration browser
((theme
(make-instance
'theme:theme
:dark-p t
:background-color- "#0C0C0D"
:background-color "#000b1e"
:background-color+ "#0C0C0D"
:on-backaground-color "#0C0C0D"
:primary-color- "#0abdc6"
:primary-color "#789FE8"
:primary-color+ "#7FABD7"
:on-primary-color "#0C0C0D"
:secondary-color- "#2c303b"
:secondary-color "#2c303b"
:secondary-color+ "#2c303b"
:on-secondary-color "#F7FBFC"
:action-color- "#6BE194"
:action-color "#4FDB71"
:action-color+ "#27BF4C"
:on-action-color "#0C0C0D"
:success-color- "#86D58E"
:success-color "#8AEA92"
:success-color+ "#71FE7D"
:on-success-color "#0C0C0D"
:highlight-color- "#EA43DD"
:highlight-color "#F45DE8"
:highlight-color+ "#FC83F2"
:on-highlight-color "#0C0C0D"
:warning-color- "#FCA904"
:warning-color "#FCBA04"
:warning-color+ "#FFD152"
:on-warning-color "#0C0C0D"
:codeblock-color- "#37A8E4"
:action-color "#37A8E4"
:action-color+ "#37A8E4"
:on-action-color "#1C61C2"))))
;; configuración de extensión para status
(define-nyxt-user-system-and-load nyxt-user/basic-config
:components ( "status"))
;; end

26
nyxt/status.lisp Normal file
View file

@ -0,0 +1,26 @@
(in-package #:nyxt-user)
(define-configuration :status-buffer
((glyph-mode-presentation-p t)))
(define-configuration :blocker-mode ((glyph "β")))
(define-configuration :reduce-tracking-mode ((glyph "τ")))
(define-configuration :style-mode ((glyph "ϕ")))
(define-configuration status-buffer
((style (str:concat %slot-value%
(theme:themed-css (theme *browser*)
'("#controls,#tabs"
:display none !important))))))
(defmethod format-status-load-status ((status status-buffer))
(spinneret:with-html-string
(:span (if (and (current-buffer)
(web-buffer-p (current-buffer)))
(case (slot-value (current-buffer) 'nyxt::status)
(:unloaded "ξ")
(:loading "λ ")
(:finished ""))
""))))