Darkdetect Versions Save

Detect OS Dark Mode from Python

v0.8.0

1 year ago

A new release of darkdetect is ready. The most prominent new feature is a listener for macOS, finally, thanks to the efforts of @zwimer. In addition, from this release the support for Python 2.7 and any versions older than 3.6 is dropped. Users of older Python versions can continue using darkdetect<=0.7.*.

Changelog:

  • macOS: add listener function (issue #25, PR #30 by @zwimer)
    • using the macOS listener requires an extra that can be installed via pip install darkdetect[macos-listener]
  • Linux: add initial support for freedesktop standard on gnome (PR #22 by @raghavdhingra24)
  • Port build chain from setup.py to pyproject.toml (PR #28 by @zwimer)
  • Drop support for Python <3.6

v0.7.1

1 year ago

It's time for a patch release. The main change is that compatibility with Python 2.7 should now be restored.

Changelog:

  • restore compatibility with Python 2.7 (inadvertently removed in #20).
  • add __main__ module to make the package callable from a terminal as python -m darkdetect.

v0.7.0

1 year ago

This release contains an important change for Linux: from now on, all the themes that have -dark (case-insensitive) in their names will be detected as 'Dark' by darkdetect. Thanks to @DoctorDalek1963 for this contribution!

Changelog:

  • Linux: generalise detection to any theme with '-dark' in theme.lower() (initially suggested in #17 by @HetDaftary, PR #24 by @DoctorDalek1963. Thanks to @larsoner for his support).
  • macOS: do not use the deprecated distutils.version to check OS version compatibility. The needed logic was reimplemented (issue #18 by @Carreau).

v0.6.0

1 year ago

Time for a new release with an exciting new feature: listeners for theme changes for Windows and Linux! Many thanks to @TransparentLC for having implemented those.

Changelog:

  • New callback API to dynamically detect when the theme is changed on Windows and Linux (issue #14, PR #20 by @TransparentLC)
  • Windows: avoid triggering ValueError when the package is imported on Windows Server (PR #21 by @PierreRaybaut)
  • Windows: switch from sys to platform to detect the OS version

v0.5.1

2 years ago

A few minor bug fixes:

  • Windows: the package could have raised FileNotFoundError in some headless systems.
    • In those cases, we catch the exception and return None as if the dark mode were not available
  • macOS: fix use of the package in hardened programs (see PR #15 for the bug report)
  • Windows: precautionary changes to support Windows 11 (PR #16 by @hussain5416)

v0.5.0

2 years ago
  • Add compatibility with macOS Big Sur on arm64 (Apple Silicon) (issue #12 raised and debugged by @psobolewskiPhD)
  • Restored compatibility with Python 2.7 on macOS Big Sur

v0.4.0

2 years ago
  • Add compatibility with macOS Big Sur (support Big Sur dynamic library cache, issue #11)

v0.3.1

3 years ago
  • Linux GTK: change detection code to use subprocess instead of ctypes (PR #10 by @larsoner, raised in #9 by @HetDaftary)

v0.3.0

3 years ago
  • Add support for GTK Dark Theme detection on Linux (PR #8 by @larsoner)

v0.2.0

3 years ago
  • Add support for Dark Theme detection on Windows 10 1607+ (build 14393+) (PR #4 by @cboy343)