Closed jrappen closed 4 years ago
Hi, first of all thanks for sharing the code.
I'm curious, was there a specific reason why you didn't choose this simpler way of detecting dark mode?
# querying for dark mode try: get_status = 'defaults read -g AppleInterfaceStyle' import subprocess status = subprocess.check_output( get_status.split(), stderr = subprocess.STDOUT ).decode() status = status.replace('\n', '') except subprocess.CalledProcessError as e: return False return True if status.lower() == 'dark' else False
Hi, first of all thanks for sharing the code.
I'm curious, was there a specific reason why you didn't choose this simpler way of detecting dark mode?