-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp,py
99 lines (98 loc) · 5.24 KB
/
app,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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import sys
f = open("/sys/class/power_supply/BAT0/capacity", "r")
charge = f.read()
f = open("/sys/class/power_supply/BAT0/status", "r")
status = f.read()
charge_print_1 = f"""
|███___________________________|
|███___________________________|
|███___________________________| {charge[0:1]}% Charge , {status.rstrip(status[-1])}
|███___________________________|
|███___________________________|
"""
charge_print_2 = f"""
|██████________________________|
|██████________________________|
|██████________________________| {charge.rstrip(status[-1])}% Charge , {status.rstrip(status[-1])}
|██████________________________|
|██████________________________|
"""
charge_print_3 = f"""
|█████████_____________________|
|█████████_____________________|
|█████████_____________________| {charge.rstrip(status[-1])}% Charge , {status.rstrip(status[-1])}
|█████████_____________________|
|█████████_____________________|
"""
charge_print_4 = f"""
|████████████__________________|
|████████████__________________|
|████████████__________________| {charge.rstrip(status[-1])}% Charge , {status.rstrip(status[-1])}
|████████████__________________|
|████████████__________________|
"""
charge_print_5 = f"""
|███████████████_______________|
|███████████████_______________|
|███████████████_______________| {charge.rstrip(status[-1])}% Charge , {status.rstrip(status[-1])}
|███████████████_______________|
|███████████████_______________|
"""
charge_print_6 = f"""
|██████████████████____________|
|██████████████████____________|
|██████████████████____________| {charge.rstrip(status[-1])}% Charge , {status.rstrip(status[-1])}
|██████████████████____________|
|██████████████████____________|
"""
charge_print_7 = f"""
|█████████████████████_________|
|█████████████████████_________|
|█████████████████████_________| {charge.rstrip(status[-1])}% Charge , {status.rstrip(status[-1])}
|█████████████████████_________|
|█████████████████████_________|
"""
charge_print_8 = f"""
|████████████████████████______|
|████████████████████████______|
|████████████████████████______| {charge.rstrip(status[-1])}% Charge , {status.rstrip(status[-1])}
|████████████████████████______|
|████████████████████████______|
"""
charge_print_9 = f"""
|███████████████████████████___|
|███████████████████████████___|
|███████████████████████████___| {charge.rstrip(status[-1])}% Charge , {status.rstrip(status[-1])}
|███████████████████████████___|
|███████████████████████████___|
"""
charge_print_10 = f"""
______________________________
|██████████████████████████████|
|██████████████████████████████|
|██████████████████████████████| {charge.rstrip(status[-1])}% Charge , {status.rstrip(status[-1])}
|██████████████████████████████|
|██████████████████████████████|
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
"""
if charge[0] == "1" and charge[1] == "0" and charge[2] == "0":
print(charge_print_10)
else:
if charge[0] == "1":
print(charge_print_1)
if charge[0] == "2":
print(charge_print_2)
if charge[0] == "3":
print(charge_print_3)
if charge[0] == "4":
print(charge_print_4)
if charge[0] == "5":
print(charge_print_5)
if charge[0] == "6":
print(charge_print_6)
if charge[0] == "7":
print(charge_print_7)
if charge[0] == "8":
print(charge_print_8)
if charge[0] == "9":
print(charge_print_9)