Calibre dark mode - set environment variable

Hi

On calibre - New in calibre 5.0, under “Dark mode support”

On Linux you have to set the CALIBRE_USE_DARK_PALETTE=1 environment variable.

Solution: In terminal run the following to active dark mode:
env CALIBRE_USE_DARK_PALETTE=1 calibre

Question:
Shouldn’t it be automatic, when user activates dark mode as through Appearence>Style and select some dark mode?
I notice that the author sayson calibre - New in calibre 5.0, under “Dark mode support”

“On Windows and macOS dark mode is activated automatically based on operating system settings.”

aka, Linux has no automatic mode base on OS settings :frowning:

My Calibre is already dark; not sure what your issue is.
I just tested by applying my ‘light’ plasma theming, and it comes out light too - depends on my theme. Maybe it just has an issue with XFCE.

Well, you don’t really need it when you’ve got the command line to execute things and cron to do things on a schedule.

Or you could always write a small systemd script to set the environment variable whenever necessary. (This might actually be the best way, although personally I’ve never done it.)

Edit:
Or you can just edit the shortcut and add CALIBRE_USE_DARK_PALETTE=1 before the command, as below:

CALIBRE_USE_DARK_PALETTE=1 %command%

This will cause the CALIBRE_USE_DARK_PALETTE to be set for calibre, thus enabling its dark mode.