albertosottile / darkdetect

Detect OS Dark Mode from Python
Other
171 stars 18 forks source link

Naive listener for macOS #27

Closed zwimer closed 1 year ago

zwimer commented 1 year ago

Add a naive macOS listener.

Small demo, toggling mode after starting thread:

>>> import darkdetect
>>> import threading
>>> t=threading.Thread(target=darkdetect.listener, args=(print,))
>>> t.start()
>>> Dark
Light
>>>
>>> [1]    13336 quit       python3
zwimer commented 1 year ago

Adds naive support for: https://github.com/albertosottile/darkdetect/issues/25

albertosottile commented 1 year ago

Closing this for the reasons mentioned in https://github.com/albertosottile/darkdetect/issues/25#issuecomment-1332795474.