-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmenu.py
More file actions
119 lines (95 loc) · 3.64 KB
/
menu.py
File metadata and controls
119 lines (95 loc) · 3.64 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
from textual.app import App, ComposeResult
from textual import events
from textual.binding import Binding
from textual.widgets import Button, Header, Label, Footer, Static, Tabs
from random import randint
class EventApp(App[str]):
CSS = """
Tabs {
dock: top;
}
Screen {
layout: grid;
grid-size: 2;
padding: 2;
align: center middle;
}
#logo {
width: 100%;
height: 100%;
column-span: 2;
content-align: center middle;
text-style: bold;
}
"""
logos = [r"""
__ __ _ _
\ \ / / (_) | |
\ \ / / ___ _ __| |
\ \/ / / _ \ | | / _` |
\ / | (_) | | | | (_| |
\/ \___/ |_| \__,_|""",
r"""
__ __ __ __
| \ | \ | \ | \
| $$ | $$ ______ \$$ ____| $$
| $$ | $$ / \ | \ / $$
\$$\ / $$ | $$$$$$\ | $$ | $$$$$$$
\$$\ $$ | $$ | $$ | $$ | $$ | $$
\$$ $$ | $$__/ $$ | $$ | $$__| $$
\$$$ \$$ $$ | $$ \$$ $$
\$ \$$$$$$ \$$ \$$$$$$$
""",
r"""
_/ _/ _/ _/
_/ _/ _/_/ _/_/_/
_/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/ _/
_/ _/_/ _/ _/_/_/
""",
r"""
_______ ______ ____ ____________ ____________
\ | | | ____\_ \__ / \ \ \
| / / /| / / \ |\___/\ \\___/| \ \
|\ \ \ |/ / /\ | \|____\ \___|/ | /\ |
\ \ \ | | | | | | | | | | | |
\| \| | | | | | __ / / __ | \/ |
|\ /| | | / /| / \/ /_/ | / /|
| \_______/ | |\ \_____/ | |____________/| /___________/ |
\ | | / | \_____\ | / | | / | | /
\|_____|/ \ | |___|/ |___________|/ |___________|/
\|____|
"""]
TABS = [
"Menu",
"Channels",
"DM's",
"Settings"
]
TITLE = "Void"
SUB_TITLE = "Welcome To Void"
COLORS = [
"white",
"black"
]
currColor = "black"
def on_mount(self) -> None:
self.screen.styles.background = "black"
tuiColor = "ctrl+t"
def on_key(self, event: events.Key) -> None:
if event.key == self.tuiColor:
if self.currColor == "black":
self.screen.styles.background = "white"
self.currColor = "white"
else:
self.screen.styles.background = "black"
self.currColor = "black"
def compose(self) -> ComposeResult:
yield Header()
yield Label(self.logos[randint(0,3)], id="logo")
#yield Footer()
yield Tabs(self.TABS[0])
if __name__ == "__main__":
app = EventApp()
reply = app.run()
print(reply)