import os
import time


def switch_theme():
    time_now = time.localtime(time.time())
    hours = time_now.tm_hour
    alacritty_theme_dir = "~/.config/alacritty/"
    light_theme = "doom-gruvbox-light-theme.yaml"
    dark_theme = "doom-gruvbox-dark-theme.yaml"
    cmd = "~/.local/bin/alacritty-colorscheme"
    if 7 < hours < 17:
        cmd += " -C " + alacritty_theme_dir + " -t " + light_theme
    else:
        cmd += " -C " + alacritty_theme_dir + " -t " + dark_theme

    return cmd


os.system(switch_theme())
