forked from aartaka/nyxt-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.lisp
51 lines (48 loc) · 2.01 KB
/
style.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
(in-package #:nyxt-user)
;; This automatically darkens WebKit-native interfaces and sends the
;; "prefers-color-scheme: dark" to all the supporting websites.
(setf (uiop:getenv "GTK_THEME") "Adwaita:dark")
;;;; My color preferences weren't satisfied by any Emacs theme, so I
;;;; wrote mine: Laconia (https://github.com/aartaka/laconia). This
;;;; file is simply a translation of Laconia colors to Nyxt interface.
;;;;
;;;; This only works on the versions of Nyxt after 3.0. For the
;;;; backwards-compatible solution, see previous versions of this
;;;; file.
(define-configuration browser
((theme (make-instance
'theme:theme
:dark-p t
:background-color "black"
:on-background-color "white"
:accent-color "#CD5C5C"
:primary-color "rgb(170, 170, 170)"
:on-primary-color "black"
:secondary-color "rgb(100, 100, 100)"
:on-secondary-color "white"))))
;;; Dark-mode is a simple mode for simple HTML pages to color those in
;;; a darker palette. I don't like the default gray-ish colors,
;;; though. Thus, I'm overriding those to be a bit more laconia-like.
(define-configuration nyxt/style-mode:dark-mode
((style
(theme:themed-css (theme *browser*)
(*
:background-color (str:concat
(if (theme:dark-p theme:theme)
theme:background
theme:on-background)
" !important")
:background-image "none !important"
:color (str:concat
(if (theme:dark-p theme:theme)
theme:on-background
theme:background)
" !important"))
(a
:background-color (str:concat
(if (theme:dark-p theme:theme)
theme:background
theme:on-background)
" !important")
:background-image "none !important"
:color (str:concat theme:primary " !important"))))))