Comments (7)
I had to go to the mentioned PR to understand exactly what this issue was about, as I am not yet in the right mindset for Windows 11. Short answer: I have no idea if this package works under Windows 11, nor I have a way to test it, nor I am sure on how to fix a potential failure.
@goanpeca Would you like to open a PR with a fix? Maybe is it as easy as changing ==
with >=
...
Side note: this is not as trivial as it might seem, as e.g. macOS 11.0 still has platform.mac_ver() = '10.16'
. Hence, for whatever PR/solution, I would recommend some testing on the target system...
from darkdetect.
I renamed the issue. I would really appreciate if anyone could test if darkdetect
works as expected on Windows 11, so we can close this issue or apply the necessary fixes.
from darkdetect.
I have found a modification to the init.py which allows Windows 11 to be detected correctly.
I am running Windows 10 and Windows 11 in Parallels Desktop 17 virtual machines under macOS Big Sur.
I first confirmed that both Windows installs correctly responded to the windows registry commands to discover the current display theme. That led me to look at the version check being used.
Windows 11 still returns '10' from platform.release(), so that part is fine. [Edited to clarify: I'm using Python 3.7.9 as the internal scripting language within Poser 12 software, which I am beta testing on both Windows and macOS. So the caveat is that the output of the platform package may see revision in later versions of Python - who knows? I originally thought that changing the platform.release() test to >= '10' or forgoing the build version test if > '10' would be applicable, but Windows 11 still reports release as '10', so presumably someone decided they didn't want to break python scripts, or else older platform packages have no facility for supporting future windows releases. Shrug.]
Instead of deriving winver from sys.getwindowsversion(), which was reporting 9200 on both win10 and win11 systems, I used the second component of platform.version() which gave me 19041 on win10 and 22000 on win11, after splitting the '10.X.XXXXX' platform.version() output
#winver = int(sys.getwindowsversion()[2])
winver = int(platform.version().split('.')[2]) # This gives better build numbers in Windows 11
from darkdetect.
I will check it tomorrow
from darkdetect.
@albertosottile I checked this issue with windows 11. Check the screenshot for the reason.
Yeah! Code still works for windows 11.
from darkdetect.
As a precaution, I created a pull request regarding this #16
from darkdetect.
Closed by #16
from darkdetect.
Related Issues (20)
- Crash on macOS Big Sur 11.4 HOT 19
- SIGSEGV (Address boundary error) on Apple Silicon M1, Big Sur 11.5.2 HOT 6
- Listener for dark mode switch? HOT 11
- distutils.version LooseVersion is deprecated HOT 2
- Doesn't work for Pop!_OS 22.04 LTS x86_64 HOT 5
- Module produces ValueError on Windows 8.1 HOT 2
- Implement `listener` for macOS HOT 6
- correct dark detection for gtk3 HOT 19
- A way to terminate listener thread HOT 5
- [RFC] macOS code choices
- Listener class PR acceptable? HOT 3
- macOS listener support on apps where `sys.executable` is not a python interpreter HOT 8
- False positive HOT 1
- Issue: darkdetect listener cannot work under sudo HOT 2
- WARNING message from PyInstaller about ignoring AppKit.framework/AppKit imported from _mac_detect.py HOT 1
- Two Windows 'Dark' modes: `AppsUseLightTheme` and `SystemUsesLightTheme`
- ModuleNotFoundError: No module named 'darkdetect' in Python 3.8 HOT 2
- Duplicate
- Linux (GNOME) HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from darkdetect.