This repository was archived by the owner on Jan 1, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
27 lines (21 loc) · 1.26 KB
/
main.py
File metadata and controls
27 lines (21 loc) · 1.26 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
from Core import Display
import curses, time
def init(stdscr):
curses.start_color()
curses.init_pair(1, curses.COLOR_WHITE, curses.COLOR_BLACK)
while True:
stdscr.clear()
stdscr.bkgd(' ', curses.color_pair(1))
title = "Запуск flexOS..."
frames = ["[ ]", "[= ]", "[== ]", "[=== ]", "[==== ]", "[===== ]", "[====== ]", "[======= ]", "[======== ]", "[========= ]", "[========== ]", "[=========== ]", "[============ ]", "[============= ]", "[============== ]", "[=============== ]", "[================ ]", "[================= ]", "[================== ]", "[=================== ]", "[====================]"]
height, width = stdscr.getmaxyx()
x_title = (width // 2) - (len(title) // 2)
stdscr.addstr(height // 2 - 2, x_title, title, curses.color_pair(1))
for frame in frames:
x_frame = (width // 2) - (len(frame) // 2)
stdscr.addstr(height // 2, x_frame, frame, curses.color_pair(1))
stdscr.refresh()
time.sleep(0.2)
break
curses.wrapper(init)
Display.init_desktop()