Using Dark Reader in Nyxt

Shameless plug: I managed to make minified version of Dark Reader work with Nyxt, enforcing a dark theme to every visited page. More so: now it’s a separate mode (nx-dark-reader:dark-reader-mode) that you can toggle per website, and it’s fully configurable almost to the same degree as Dark Reader itself is!

Find the extension at Github, I also have an example configuration for it.

4 Likes

Awesome! Thanks for sharing.

Amazing! I used Dark Reader, this is great!

[EDIT]: Nevermind, I just saw the note that it doesn’t work with Nyxt 2.*.

I’m having some difficulty with this. I followed the instructions on Github. I cloned the repository into $XDG/share/nyxt/extensions (Nyxt created this directory when I first started it and it’s in line with my XDG settings, so I’m assuming it’s correct). I then added

(load-after-system :nx-dark-reader (nyxt-init-file "dark-reader.lisp"))
(define-configuration web-buffer
   ((default-modes `(nx-dark-reader:dark-reader-mode ,@%slot-default%))) )

to init.lisp. However on start I’m getting an error saying NX-DARK-READER::FFI-BUFFER-ADD-USER-SCRIPT is undefined.

My Nyxt version is 2.2.4 (from the Void repository).

How do I go about working out what’s causing this?