nx-dark-reader
nx-dark-reader copied to clipboard
Nyxt (3.0+) integration with Dark Reader.
#+TITLE:Dark Reader in Nyxt!
This integrates the code behind the [[https://github.com/darkreader/darkreader][Dark Reader]] Chrome/Firefox extension with Nyxt.
- Getting Started BEWARE: it doesn't work on Nyxt 2.*, as the APIs used belong to the 3.0 release and are only available on current master.
First, clone this repository: #+begin_src sh
~/.local/share/nyxt/extensions/nx-dark-reader is the extensions path.
Change if you set it to a different value.
git clone https://github.com/aartaka/nx-dark-reader.git ~/.local/share/nyxt/extensions/nx-dark-reader #+end_src
Then load it in your init file:
#+begin_src lisp ;;; ~/.config/nyxt/config.lisp (define-nyxt-user-system-and-load "nyxt-user/dark-reader" ;; Remove this line if you don't need the file. :components ("dark-reader.lisp") :depends-on (:nx-dark-reader)) #+end_src
Optionally, configure it and add it to your =default-modes= in =dark-reader.lisp= (create the file if necessary).
#+begin_src lisp ;;; ~/.config/nyxt/dark-reader.lisp (define-configuration nx-dark-reader:dark-reader-mode ;; Note the nxdr: short package prefix. It's for your convenience :) ((nxdr:brightness 80) (nxdr:contrast 60) (nxdr:text-color "white")))
;; Add dark-reader to default modes (define-configuration web-buffer ((default-modes `(nxdr:dark-reader-mode ,@%slot-value%)))) #+end_src
And you're all set! Enjoy your Dark Reader theme :)