Exemplo n.º 1
0
def restart():
    try:
        Kernel.Clear()
        Kernel.Prepare_For_shutdown()
        Boot.Boot()

    except AttributeError:
        Kernel.Crash("Second_Restart_Error", True)
Exemplo n.º 2
0
def restart_os():
    try:
        Kernel.Prepare_For_shutdown()
        time.sleep(1)
        Kernel.startup()

    except AttributeError:
        Kernel.Crash("Second_Restart_Error", True)
Exemplo n.º 3
0
def SystemHotkeys():
    global toggle
    if keyboard.is_pressed("f8"):
        print("Kernel running " + str(Kernel.running))
        time.sleep(0.5)

    if keyboard.is_pressed("f3"):
        CrashHandler.CrashHandler("User_Started_Screen_Of_Death", True)

    if keyboard.is_pressed("f4"):
        Kernel.Prepare_For_shutdown()
        Kernel.Shutdown()

    if keyboard.is_pressed("f5"):
        try:
            Doc = open("Cos/doc.txt", "r")
            Doc_Contents = Doc.read()
            print(Doc_Contents)
            Doc.close()

        except FileExistsError:
            print("Could not find file")
        time.sleep(0.5)

    if keyboard.is_pressed("f2"):
        if toggle:
            toggle = False
            print("hotkey input")
            time.sleep(0.5)

        if not toggle:
            toggle = True
            print("text input")
            Kernel.Do_Input = True
        if toggle:
            Kernel.Read_Keyboard()
Exemplo n.º 4
0
def ScreenOfDeath(Text, Error_Code):
    print(colored(str(Text), "red"), Error_Code)
    input()
    Kernel.Prepare_For_shutdown()
    Kernel.Shutdown()
Exemplo n.º 5
0
def restart():
    Kernel.Clear()
    Kernel.Prepare_For_shutdown()
    Start.Start()
Exemplo n.º 6
0
def restart():
    Kernel.Clear()
    Kernel.Prepare_For_shutdown()
    Boot.Boot()
Exemplo n.º 7
0
def restart_os():
    Kernel.Prepare_For_shutdown()
    time.sleep(1)
    Kernel.startup()