How to set 'darken' mode for all buffers?

Hi ! I’ve learned how to ‘darken’ current buffer. Sweet.

Now i’m wondering, how to ‘darken’ not only the current but all buffers ?

Let’s use ‘dark-mode’.Hooray!

But wait a sec. … Could it be a minor bug … the fact of ‘dark-mode’ not being honoured when link-navigating onto a new buffer ?

thanks, thanks, thanks

You can append dark-mode to the default-modes of buffer, and it will be there in all the buffers. In other words

#+nyxt-2
(define-configuration buffer
  ((default-modes (append '(dark-mode) %slot-default%))))
#+nyxt-3
(define-configuration buffer
  ((default-modes (append '(dark-mode) %slot-value%))))

In what case exactly is dark-mode not honored—when you navigate via mouse click or when using follow-hint and link-hinting mechanisms in general?

Or is it switching to another buffer you’re talking about? If so, then all buffers have their own sets of modes, and no mode is shared between those (there are no global modes in Nyxt). So you have to either toggle it separately in separate buffers, or add it to default-modes.


Shameless plug: if you’re on 3.* branch, you can try out GitHub - aartaka/nx-dark-reader: Nyxt (3.0+) integration with Dark Reader. for a more intuitive dark mode :slight_smile:

Ah… i’ll give the nx-dark-reader extension a try, once Guix repositories offer the 3.* branch… hopefully soon! . Thanks, thanks, thanks.

I’ll append the mode to the default buffer configuration in my nyxt init. file.

To be more precise, in my current 2.* branch setup dark-mode is not being honored when i ‘C-u C-j’ and then follow the link while opening a new buffer.

Hope it helps !

Hmmmm. That is weird, but I’m pretty sure we’ve fixed it on 3.* :face_with_spiral_eyes: