Compare commits
2 commits
1ca7ce751a
...
31c10e81b9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
31c10e81b9 | ||
|
|
2b0958f638 |
1 changed files with 35 additions and 0 deletions
|
|
@ -6,3 +6,38 @@ haTerm is a Terminal Based hafas client, using the ivb endpoint.
|
|||
Prompt_toolkit (https://github.com/prompt-toolkit/python-prompt-toolkit) will be used to render a terminal user interface (TUI).
|
||||
The application will provide routing information and station departures/arrivals.
|
||||
"""
|
||||
|
||||
from prompt_toolkit import Application
|
||||
from prompt_toolkit.buffer import Buffer
|
||||
from prompt_toolkit.layout.layout import Layout
|
||||
from prompt_toolkit.layout.containers import Window, VSplit, HSplit
|
||||
from prompt_toolkit.layout.controls import BufferControl
|
||||
from prompt_toolkit.widgets import Button
|
||||
|
||||
|
||||
hstelle=Buffer()
|
||||
|
||||
|
||||
|
||||
def button_handler():
|
||||
print("Haltestelle")
|
||||
|
||||
|
||||
monitor = Button(text= "Monitor", handler= button_handler, width= 12, left_symbol= '<', right_symbol= '>')
|
||||
|
||||
root_container= HSplit(children=[
|
||||
VSplit(children=[
|
||||
monitor,
|
||||
Window(width=1, char='│', style="fg:#9D1D75"),
|
||||
]),
|
||||
Window(height=1, char='', style="bg:#9D1D75"),
|
||||
|
||||
|
||||
])
|
||||
|
||||
layout = Layout(root_container)
|
||||
|
||||
|
||||
|
||||
app = Application(layout=layout, full_screen=True)
|
||||
app.run()
|
||||
Loading…
Add table
Add a link
Reference in a new issue