Fix NYXT theme colours

This commit is contained in:
Evie Litherland-Smith 2025-01-27 11:20:48 +00:00
parent 25d6d2d8e4
commit e9554a867e
2 changed files with 22 additions and 24 deletions

View file

@ -61,8 +61,7 @@
(define-configuration context-buffer (define-configuration context-buffer
"Go through the search engines above and make-search-engine out of them." "Go through the search engines above and make-search-engine out of them."
((search-engines ((search-engines
(mapcar (lambda (engine) (apply 'make-search-engine engine)) (mapcar (lambda (engine) (apply 'make-search-engine engine)) *my-search-engines*))))
*my-search-engines*))))
(define-configuration browser (define-configuration browser
((restore-session-on-startup-p t))) ((restore-session-on-startup-p t)))

View file

@ -18,33 +18,32 @@
;; Define custom theme ;; Define custom theme
(define-configuration browser (define-configuration browser
((theme (make-instance 'theme:theme ((theme (make-instance 'theme:theme
:dark-p ${if variant == "light" then "nil" else "t"}
:font-family "${fonts.sansSerif.name}" :font-family "${fonts.sansSerif.name}"
:monospace-font-family "${fonts.monospace.name}" :monospace-font-family "${fonts.monospace.name}"
:text-color "${scheme.base05}" :text-color "${scheme.base05}"
:contrast-text-color "${scheme.base01}" :contrast-text-color "${scheme.base04}"
:background-color "${scheme.base00}" :background-color "${scheme.base00}"
:primary-color "${scheme.base02}" :primary-color "${scheme.base04}"
:secondary-color "${scheme.base03}" :secondary-color "${scheme.base03}"
:tertiary-color "${scheme.base03}" :tertiary-color "${scheme.base03}"
:quaternary-color "${scheme.base03}" :quaternary-color "${scheme.base03}"
:accent-color "${scheme.base0E}" :accent-color "${accent}"
:action-color "${scheme.cyan}" :action-color "${scheme.cyan}"
:success-color "${scheme.green}" :success-color "${scheme.green}"
:warning-color "${scheme.yellow}" :warning-color "${scheme.yellow}"
:highlight-color "${scheme.base01}" :highlight-color "${scheme.base04}"
:codeblock-color "${scheme.base01}" :codeblock-color "${scheme.base01}"
;; :on-background-color "${scheme.base05}" :on-background-color "${scheme.base05}"
;; :on-primary-color "${scheme.base05}" :on-primary-color "${scheme.base01}"
;; :on-secondary-color "${scheme.base05}" :on-secondary-color "${scheme.base01}"
;; :on-tertiary-color "${scheme.base05}" :on-tertiary-color "${scheme.base01}"
;; :on-quaternary-color "${scheme.base05}" :on-quaternary-color "${scheme.base01}"
;; :on-accent-color "${scheme.base01}" :on-accent-color "${scheme.base01}"
;; :on-action-color "${scheme.base01}" :on-action-color "${scheme.base01}"
;; :on-success-color "${scheme.base01}" :on-success-color "${scheme.base01}"
;; :on-warning-color "${scheme.base01}" :on-warning-color "${scheme.base01}"
;; :on-highlight-color "${scheme.base01}" :on-highlight-color "${scheme.base01}"
;; :on-codeblock-color "${scheme.base05}" :on-codeblock-color "${scheme.base05}"
)))) ))))
''; '';
}; };
@ -53,8 +52,8 @@
# Make a string of lisp-style list of strings, from nix-style # Make a string of lisp-style list of strings, from nix-style
# list # list
convertTags = tags: "(" + (builtins.foldl' (x: y: x + " \"" + y + "\"") "" tags) + " )"; convertTags = tags: "(" + (builtins.foldl' (x: y: x + " \"" + y + "\"") "" tags) + " )";
# Take bookmarks as returned from JSON file and convert to NYXT # Take bookmarks as returned from JSON file and convert to
# expected format # NYXT expected format
convertBookmark = convertBookmark =
{ {
name, name,
@ -64,10 +63,10 @@
"(:url \"${url}\" :title \"${name}\" :tags ${convertTags tags})\n"; "(:url \"${url}\" :title \"${name}\" :tags ${convertTags tags})\n";
in in
( (
# Fold all entries in bookmarks.json into single string of NYXT # Fold all entries in bookmarks.json into single string of
# format bookmarks, each entry on a new line and with 2 space # NYXT format bookmarks, each entry on a new line and with 2
# indentation, just for visual clarity if reading the outputted # space indentation, just for visual clarity if reading the
# file # outputted file
"(\n" "(\n"
+ (builtins.foldl' (x: y: x + " " + convertBookmark y) "" ( + (builtins.foldl' (x: y: x + " " + convertBookmark y) "" (
builtins.fromJSON (builtins.readFile ./bookmarks.json) builtins.fromJSON (builtins.readFile ./bookmarks.json)