From 687a0fa8c2e757bc848d7da1abe610b12445a198 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Fri, 2 Feb 2024 17:53:26 +0200 Subject: nyxt: Rename modules as keys & style --- .config/nyxt/colorscheme.lisp | 144 ------------------------------------------ .config/nyxt/keybinds.lisp | 15 ----- .config/nyxt/keys.lisp | 25 ++++++++ .config/nyxt/style.lisp | 144 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 169 insertions(+), 159 deletions(-) delete mode 100644 .config/nyxt/colorscheme.lisp delete mode 100644 .config/nyxt/keybinds.lisp create mode 100644 .config/nyxt/keys.lisp create mode 100644 .config/nyxt/style.lisp (limited to '.config/nyxt') diff --git a/.config/nyxt/colorscheme.lisp b/.config/nyxt/colorscheme.lisp deleted file mode 100644 index 4dee682..0000000 --- a/.config/nyxt/colorscheme.lisp +++ /dev/null @@ -1,144 +0,0 @@ - -(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") - -;; badger colorscheme, from doom-themes -(defvar badger-bg "#171717") -(defvar badger-bg-alt "#2f2f2f") -(defvar badger-base-01 "#1D1D1D") -(defvar badger-base-04 "#433F4f") -(defvar badger-fg "#F6F3E8") -(defvar badger-red "#E2434C") -(defvar badger-orange "#EA9847") -(defvar badger-green "#86B187") -(defvar badger-teal "#65A399") -(defvar badger-yellow "#E0D063") -(defvar badger-blue "#8AC6F2") -(defvar badger-magenta "#E18Cbb") -(defvar badger-violet "#BF93C3") -(defvar badger-dark-cyan "#5699AF") -(defvar badger-dark-violet "#635770") -(defvar badger-olive "#9AA68E") -(defvar badger-dull-red "#A55662") - - -(defvar old-hope-red "#ea3d54") -(defvar old-hope-bg "#1c1d20") -(defvar old-hope-bg-alt "#151619") - -(defvar monokai-dark-blue "#727280") -(defvar monokai-orange "#FD971F") - -(defvar gruvbox-red "#fb4934") -(defvar gruvbox-orange "#fe8019") - -(defvar bg-magenta-intense "#7030af") -(defvar bg-red-subtle "#620f2a") -(defvar bg-green-subtle "#00422a") -(defvar bg-yellow-nuanced "#381d0f") -(defvar lavendar-bg "#38325c") - -(defvar default-dark-theme - (make-instance 'theme:theme - :background-color- "#333333" - :background-color "#121212" - :background-color+ "#000000" - :primary-color- "#d7752f" - :primary-color "#e48d4e" - :primary-color+ "#efa671" - :secondary-color- "#9f592d" - :secondary-color "#844115" - :secondary-color+ "#683008" - :action-color- "#763df2" - :action-color "#571fd2" - :action-color+ "#481fa2" - :highlight-color- "#ea43dd" - :highlight-color "#f46de8" - :highlight-color+ "#fc83f2" - :success-color- "#05f4cd" - :success-color "#4cfbcf" - :success-color+ "#87fcdf" - :warning-color- "#fca904" - :warning-color "#fcba04" - :warning-color+ "#ffd152" - :codeblock-color- "#44355a" - :codeblock-color "#2e243d" - :codeblock-color+ "#221a2d" - :text-color- "#dedede" - :text-color "#ededed" - :text-color+ "#ffffff" - :contrast-text-color "#0c0c0d")) - -(defvar thanos/dark-theme - (make-instance 'theme:theme - :background-color- badger-bg-alt - :background-color badger-bg - :background-color+ gruvbox-orange - - :primary-color- "red" - :primary-color badger-base-04 - :primary-color+ "#efa671" - - :secondary-color- "#9f592d" - :secondary-color badger-bg-alt - :secondary-color+ "#683008" - - :action-color- gruvbox-red - :action-color gruvbox-red - :action-color+ gruvbox-red - - :highlight-color- "#ea43dd" - :highlight-color badger-orange - :highlight-color+ "#fc83f2" - - :success-color- "#05f4cd" - :success-color badger-green - :success-color+ "#87fcdf" - - :warning-color- "red" - :warning-color badger-red - :warning-color+ "red" - - :codeblock-color- "red" - :codeblock-color badger-bg-alt - - :text-color- badger-fg - :text-color badger-fg - :text-color+ badger-fg - - :contrast-text-color badger-fg - - :font-family "Jetbrains Mono" - :monospace-font-family "Jetbrains Mono")) - -(define-configuration browser - ((theme thanos/dark-theme - :doc - "Covers all the semantic groups (warning-color, codeblock-color etc.) -Note that you can also define more nuanced colors, like warning-color+, so -that the interface gets even nicer. Otherwise Nyxt generates the missing colors -automatically, which should be good enough... for most cases."))) - -(define-configuration nyxt/mode/style:dark-mode - ((style - (theme:themed-css (theme *browser*) - ;; `(h1 :color ,monokai-dark-blue "!important") - ;; `(h2 :color ,badger-orange "!important") - ;; `(h3 :color ,badger-green "!important") - ;; `(article :background-color "red" "!important" - ;; :color "red" "!important") - ;; `(header :color "red") - `(a :background-color "#000000" "!important" - :background-image none "!important" - :color ,badger-blue "!important") - `(* :background-color "#000000" "!important" - :color "#ffffff" "!important" - :background-image none "!important!") - `(video :background-color none "!important")))) - :doc - "Notice the use of theme:themed-css for convenient theme color injection.") - - diff --git a/.config/nyxt/keybinds.lisp b/.config/nyxt/keybinds.lisp deleted file mode 100644 index 09d4f99..0000000 --- a/.config/nyxt/keybinds.lisp +++ /dev/null @@ -1,15 +0,0 @@ -(in-package #:nyxt-user) - -(define-configuration :document-mode - "Add basic keybindings." - ((keyscheme-map - (keymaps:define-keyscheme-map - "custom" (list :import %slot-value%) - nyxt/keyscheme:emacs - (list "C-c p" 'copy-password - "C-c u" 'copy-username - "C-c y" 'autofill - "C-f" :history-forwards-maybe-query - "C-s" :search-buffer - "C-l" 'thanos/set-url - "M-l" 'thanos/set-url-new-buffer))))) diff --git a/.config/nyxt/keys.lisp b/.config/nyxt/keys.lisp new file mode 100644 index 0000000..6b6f83a --- /dev/null +++ b/.config/nyxt/keys.lisp @@ -0,0 +1,25 @@ +(in-package #:nyxt-user) + +(define-configuration buffer + ((default-modes + (pushnew 'nyxt/mode/emacs:emacs-mode %slot-value%)))) + +(define-configuration input-buffer + ((override-map + (let ((map (make-keymap "override-map"))) + (define-key map "M-x" 'execute-command "C-space" 'nothing))))) + +(define-configuration :document-mode + "Add basic keybindings." + ((keyscheme-map + (keymaps:define-keyscheme-map + "custom" (list :import %slot-value%) + nyxt/keyscheme:emacs + (list "C-c p" 'copy-password + "C-c u" 'copy-username + "C-c y" 'autofill + "C-c v" 'visual-mode + "C-f" :history-forwards-maybe-query + "C-s" :search-buffer + "C-l" 'thanos/set-url + "M-l" 'thanos/set-url-new-buffer))))) diff --git a/.config/nyxt/style.lisp b/.config/nyxt/style.lisp new file mode 100644 index 0000000..4dee682 --- /dev/null +++ b/.config/nyxt/style.lisp @@ -0,0 +1,144 @@ + +(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") + +;; badger colorscheme, from doom-themes +(defvar badger-bg "#171717") +(defvar badger-bg-alt "#2f2f2f") +(defvar badger-base-01 "#1D1D1D") +(defvar badger-base-04 "#433F4f") +(defvar badger-fg "#F6F3E8") +(defvar badger-red "#E2434C") +(defvar badger-orange "#EA9847") +(defvar badger-green "#86B187") +(defvar badger-teal "#65A399") +(defvar badger-yellow "#E0D063") +(defvar badger-blue "#8AC6F2") +(defvar badger-magenta "#E18Cbb") +(defvar badger-violet "#BF93C3") +(defvar badger-dark-cyan "#5699AF") +(defvar badger-dark-violet "#635770") +(defvar badger-olive "#9AA68E") +(defvar badger-dull-red "#A55662") + + +(defvar old-hope-red "#ea3d54") +(defvar old-hope-bg "#1c1d20") +(defvar old-hope-bg-alt "#151619") + +(defvar monokai-dark-blue "#727280") +(defvar monokai-orange "#FD971F") + +(defvar gruvbox-red "#fb4934") +(defvar gruvbox-orange "#fe8019") + +(defvar bg-magenta-intense "#7030af") +(defvar bg-red-subtle "#620f2a") +(defvar bg-green-subtle "#00422a") +(defvar bg-yellow-nuanced "#381d0f") +(defvar lavendar-bg "#38325c") + +(defvar default-dark-theme + (make-instance 'theme:theme + :background-color- "#333333" + :background-color "#121212" + :background-color+ "#000000" + :primary-color- "#d7752f" + :primary-color "#e48d4e" + :primary-color+ "#efa671" + :secondary-color- "#9f592d" + :secondary-color "#844115" + :secondary-color+ "#683008" + :action-color- "#763df2" + :action-color "#571fd2" + :action-color+ "#481fa2" + :highlight-color- "#ea43dd" + :highlight-color "#f46de8" + :highlight-color+ "#fc83f2" + :success-color- "#05f4cd" + :success-color "#4cfbcf" + :success-color+ "#87fcdf" + :warning-color- "#fca904" + :warning-color "#fcba04" + :warning-color+ "#ffd152" + :codeblock-color- "#44355a" + :codeblock-color "#2e243d" + :codeblock-color+ "#221a2d" + :text-color- "#dedede" + :text-color "#ededed" + :text-color+ "#ffffff" + :contrast-text-color "#0c0c0d")) + +(defvar thanos/dark-theme + (make-instance 'theme:theme + :background-color- badger-bg-alt + :background-color badger-bg + :background-color+ gruvbox-orange + + :primary-color- "red" + :primary-color badger-base-04 + :primary-color+ "#efa671" + + :secondary-color- "#9f592d" + :secondary-color badger-bg-alt + :secondary-color+ "#683008" + + :action-color- gruvbox-red + :action-color gruvbox-red + :action-color+ gruvbox-red + + :highlight-color- "#ea43dd" + :highlight-color badger-orange + :highlight-color+ "#fc83f2" + + :success-color- "#05f4cd" + :success-color badger-green + :success-color+ "#87fcdf" + + :warning-color- "red" + :warning-color badger-red + :warning-color+ "red" + + :codeblock-color- "red" + :codeblock-color badger-bg-alt + + :text-color- badger-fg + :text-color badger-fg + :text-color+ badger-fg + + :contrast-text-color badger-fg + + :font-family "Jetbrains Mono" + :monospace-font-family "Jetbrains Mono")) + +(define-configuration browser + ((theme thanos/dark-theme + :doc + "Covers all the semantic groups (warning-color, codeblock-color etc.) +Note that you can also define more nuanced colors, like warning-color+, so +that the interface gets even nicer. Otherwise Nyxt generates the missing colors +automatically, which should be good enough... for most cases."))) + +(define-configuration nyxt/mode/style:dark-mode + ((style + (theme:themed-css (theme *browser*) + ;; `(h1 :color ,monokai-dark-blue "!important") + ;; `(h2 :color ,badger-orange "!important") + ;; `(h3 :color ,badger-green "!important") + ;; `(article :background-color "red" "!important" + ;; :color "red" "!important") + ;; `(header :color "red") + `(a :background-color "#000000" "!important" + :background-image none "!important" + :color ,badger-blue "!important") + `(* :background-color "#000000" "!important" + :color "#ffffff" "!important" + :background-image none "!important!") + `(video :background-color none "!important")))) + :doc + "Notice the use of theme:themed-css for convenient theme color injection.") + + -- cgit v1.2.3