-
Notifications
You must be signed in to change notification settings - Fork 0
/
system_power_toolkit.py
35 lines (27 loc) · 1.01 KB
/
system_power_toolkit.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from tkinter import *
import os
def restart():
os.system("shutdown /r /t 1")
def restart_time():
os.system("shutdown /r /t 20")
def logout():
os.system("shutdown -l")
def shutdown():
os.system("shutdown /s /t 1")
st = Tk()
st.title("System Power Toolkit")
st.geometry("500x500")
st.config(bg="Black")
r_button = Button(st,text="Restart",font=("Time New Roman",20,"bold"),
relief=RAISED,cursor="plus",command=restart)
r_button.place(x=150,y=60,height=50,width=200)
rt_button = Button(st,text="Restart Time",font=("Time New Roman",20,"bold"),
relief=RAISED,cursor="plus",command=restart_time)
rt_button.place(x=150,y=170,height=50,width=200)
lg_button = Button(st,text="Log-Out",font=("Time New Roman",20,"bold"),
relief=RAISED,cursor="plus",command=logout)
lg_button.place(x=150,y=270,height=50,width=200)
st_button = Button(st,text="ShutDown",font=("Time New Roman",20,"bold"),
relief=RAISED,cursor="plus",command=shutdown)
st_button.place(x=150,y=370,height=50,width=200)
st.mainloop()