Skip to content

Commit

Permalink
[nyxt] setup proper fonts and vi modes
Browse files Browse the repository at this point in the history
  • Loading branch information
meain committed Jan 2, 2024
1 parent 0d6aefa commit b16a85d
Showing 1 changed file with 41 additions and 8 deletions.
49 changes: 41 additions & 8 deletions nyxt/.config/nyxt/config.lisp
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
(in-package #:nyxt-user)

;; (define-configuration browser
;; (;; This is for Nyxt to never prompt me about restoring the previous session.
;; (autofills (list (make-autofill :name "First Name" :fill "Abin")
;; (make-autofill :name "Last Name" :fill "Simon")
;; (make-autofill :name "Name" :fill "Abin Simon")
;; (make-autofill :name "Email" :fill "[email protected]")))))

;; (define-configuration browser
;; ((theme
;; (make-instance 'theme:theme
;; :font-family "MonoLisa"
;; :font-family "Sarasa Mono SC Nerd"
;; :accent-color "#C1E7F4")
;; :doc "The theme to use for the browser.")))

Expand All @@ -14,15 +23,15 @@
(define-configuration (window)
((message-buffer-style
(theme:themed-css (theme *browser*)
`(* :font-family "MonoLisa" :font-size "11px")
`(* :font-family "Sarasa Mono SC Nerd" :font-size "11px")
`(body :padding 0 :padding-left "9px" :margin "3px")))))

;; prompt buffer appearance
(define-configuration prompt-buffer
((style (str:concat
%slot-value%
(theme:themed-css (theme *browser*)
`(* :font-family "MonoLisa" :font-size "13px")
`(* :font-family "Sarasa Mono SC Nerd" :font-size "13px")
`(body :border "0px")
`("#prompt" :margin-left "9px" :margin-right "9px" :font-weight "bold")
`("#prompt-area" :border "0px")
Expand All @@ -40,18 +49,19 @@
((style (str:concat
%slot-value%
(theme:themed-css (theme *browser*)
`(* :font-family "MonoLisa" :font-size "13px")
`(* :font-family "Sarasa Mono SC Nerd" :font-size "13px")
`("#controls" :display "flex" :justify-content "space-around")
`(".arrow-left" :clip-path "unset")
`(".arrow-right" :clip-path "unset")
`(".tab" :clip-path "unset"))))))

;; web buffer appearance
(define-configuration web-buffer
((style (str:concat
((smooth-scrolling t)
(style (str:concat
%slot-value%
(theme:themed-css (theme *browser*)
`(* :font-family "MonoLisa" :font-size "13px"))))
`(* :font-family "Sarasa Mono SC Nerd !important"))))
(override-map (let ((map (make-keymap "override-map")))
(define-key map
"M-x" 'execute-command
Expand All @@ -62,5 +72,28 @@
"C-x b" (lambda-command my/switch-buffer ()
"Switch-buffer with expected buffer-order."
(switch-buffer :current-is-last-p t))
"C-x k" 'delete-current-buffer
"C-x C-k" 'delete-buffer)))))
"M-w" 'delete-current-buffer
"C-x C-k" 'delete-buffer
"C-r" 'reload-page)))))

;; use vi-modes
(define-configuration (web-buffer panel-buffer)
((default-modes (pushnew 'nyxt/mode/vi:vi-normal-mode %slot-value%))))
(define-configuration (prompt-buffer nyxt/mode/editor:editor-buffer)
((default-modes (pushnew 'nyxt/mode/vi:vi-insert-mode %slot-value%))))

;; (define-configuration nyxt/style-mode:dark-mode
;; ((style #.(cl-css:css
;; '((*
;; :background-color "red !important"
;; :background-image "none !important"
;; :color "white")
;; (a
;; :background-color "black !important"
;; :background-image "none !important"
;; :color "#7D8FA3 !important"))))))
;; (make-style-association
;; :predicate (lambda (url) (> (length url) 10))
;; :style (cl-css:css
;; '((body
;; :background-color "black"))))

0 comments on commit b16a85d

Please sign in to comment.