from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
from datetime import datetime
from time import gmtime, strftime
import time

black = '#000000'
white = '#ffffff'

image = Image.new("P", (400, 300))
draw = ImageDraw.Draw(image)

fontSymbols = ImageFont.truetype("SymbolsNerdFont-Regular.ttf", 18)
fontTitle = ImageFont.truetype("Nunito-SemiBold.ttf", 24)
fontLarge = ImageFont.truetype ("Nunito-ExtraLight.ttf", 18)
fontSmall = ImageFont.truetype ("Nunito-ExtraLight.ttf", 16)
fontVerySmall = ImageFont.truetype("Nunito-ExtraLight.ttf", 10)

# Draw the top bar
draw.rectangle((0, 0, 400, 300), fill=white)
draw.rectangle((0, 0, 400, 40), fill=black)

# Add the clock
timeStr = strftime("%H:%M", time.localtime())
draw.text((10, 10), timeStr, white, fontSmall)

# Add indoor tempriture
draw.text((350, 10), "19c", white, fontSmall)

# Add tasks
draw.text((10, 50), 'Tasks', black, fontTitle)

draw.text((10, 90), '󰄱', black, fontSymbols)
draw.text((30, 87), 'Do a thing', black, fontLarge)


draw.text((10, 120), '󰄵', black, fontSymbols)
draw.text((30, 117), 'Done a thing', black, fontLarge)


image.save('built.bmp')