zaz / nx-dark-reader

Nyxt (3.0+) integration with Dark Reader.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dark Reader in Nyxt!

This integrates the code behind the 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:

# ~/.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

Then load it in your init file and add it to your default-modes:

;;; ~/.config/nyxt/config.lisp
(define-nyxt-user-system-and-load "nyxt-user/dark-reader"
  :depends-on (:nx-dark-reader) :components ("dark-reader.lisp"))

Optionally, configure it in the dark-reader.lisp (create if necessary).

;;; ~/.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")))


(define-configuration web-buffer
  ((default-modes `(nxdr:dark-reader-mode ,@%slot-value%))))

And you’re all set! Enjoy your Dark Reader theme :)

About

Nyxt (3.0+) integration with Dark Reader.

License:BSD 2-Clause "Simplified" License


Languages

Language:Common Lisp 100.0%