# https://forum.omz-software.com/topic/3251/how-to-detect-retina-display

# isretina.py
from objc_util import *
us = ObjCClass('UIScreen')
if us.mainScreen().scale() == 2.0:
	print('Retina')
elif us.mainScreen().scale() == 3.0:
	print('iPhone Plus')
else:
	print('Non retina')
	
# --------------------

from objc_util import ObjCClass
scale = ObjCClass('UIScreen').mainScreen().scale()
print({2: 'Retina', 3: 'iPhone Plus'}.get(scale, 'Non retina'))

# --------------------

ct = datetime.time(5, 0, 0)
cut_time = ct.strftime("%I:%M:%p")

nm = datetime.time(17, 0, 0)
Nightmode = nm.strftime("%I:%M:%p")

time = datetime.datetime.now()
current_time = time.strftime("%I:%M:%p")

day = datetime.date.today()
today = day.strftime("%m %d %Y")

UIScreen = ObjCClass('UIScreen')
# Wrapping ObjC method as Python Object
screen = UIScreen.mainScreen()


def main():
    if current_time < Nightmode or current_time > daymode:
        print(today)
        question = input("are you indoors ? (y/n): ")
        if question == 'Y' or 'y':
            day_night = input('Day or Night: ')
            if day_night == "Day" or "day" or "DAY":
                print('setting mode to Day')
                print('Time Now:', current_time)
                screen.setBrightness(0.80)
                print('Day mode is Active')

            elif day_night == 'Night' or 'NIGHT' or 'night':