Download scripts/os4_spec.py from KillerBoss/e-os-v4: direct link, hf CLI and curl.
- Browser
- Download file 4.33 kB
-
https://huggingface.co/KillerBoss/e-os-v4/resolve/main/scripts/os4_spec.py
- Command line
-
hf download hf://KillerBoss/e-os-v4/scripts/os4_spec.py
-
curl -L -o os4_spec.py https://huggingface.co/KillerBoss/e-os-v4/resolve/main/scripts/os4_spec.py
4.33 kB
| # E-OS v4 — shared spec (Python dataset side). | |
| # MUST stay in sync with eos-apk/src/com/killerboss/eos/{OsPainter.kt,OsState.kt} | |
| # | |
| # Philosophy (user requirement v4): | |
| # - NO MASKS, NO CELL GATING: one FrameGenerator produces the ENTIRE frame. | |
| # - Code draws only a ROUGH layout hint (flat shapes, "was wo sein soll") as | |
| # conditioning input for the generator ("Hilfe für den frame Generator"). | |
| # - Target: 60 Hz full-frame generation on Hexagon NPU. | |
| # - Back buttons everywhere (top-left + nav bar + hardware back). | |
| # | |
| # Geometry: everything is authored at FULL resolution 384x832 (portrait). | |
| # hint = full-res rough drawing downscaled to 192x416 (generator input) | |
| # styled = full-res final frame (384x832) (generator output / GT) | |
| FULL_W, FULL_H = 384, 832 | |
| HINT_W, HINT_H = 192, 416 # = FULL/2 | |
| STATE_DIM = 32 | |
| SCREENS = ["LOCK", "HOME", "DRAWER", "CALC", "WEATHER", "MUSIC", "SETTINGS", "ABOUT"] | |
| N_SCREENS = 8 | |
| # ---------------- state vector layout (32 floats) ---------------- | |
| # 0..7 screen one-hot | |
| # 8 transition t (0 = none, 0..1 slide progress) | |
| # 9 from_screen / 7.0 (slide source) | |
| # 10..13 ripple1 x/W, y/H, r/RMAX, strength | |
| # 14..17 ripple2 | |
| # 18..19 day phase sin, cos (phase = minutes/1440) | |
| # 20 second pulse (0..1) | |
| # 21..22 accent hue sin, cos (hue/360*2pi) | |
| # 23 battery /100 | |
| # 24 music level (0..1) | |
| # 25..28 weather one-hot: sunny, cloudy, rain, night-clear | |
| # 29 music playing (0/1) | |
| # 30 pressed flag (0/1) | |
| # 31 aurora/firefly global drift phase (0..1) | |
| RMAX = 300.0 | |
| # ---------------- palette (rough hint theme, flat) ---------------- | |
| H_BG = (17, 19, 26) | |
| H_CARD = (30, 34, 44) | |
| H_STROKE = (52, 58, 70) | |
| H_TXT = (210, 216, 226) | |
| H_DIM = (130, 138, 152) | |
| H_ACC = (120, 130, 150) # neutral accent in hint (hue lives in state vec) | |
| # ---------------- layout ---------------- | |
| STATUS_H = 24 | |
| NAV_H = 52 | |
| NAV_Y0 = FULL_H - NAV_H # 780 | |
| # nav bar buttons (x0,y0,x1,y1) | |
| NAV_BACK = (10, 790, 70, 822) | |
| NAV_HOME = (162, 790, 222, 822) | |
| NAV_APPS = (314, 790, 374, 822) | |
| BACK_BTN = (12, 34, 64, 78) # in-app back button (sub screens) | |
| HOME_CARDS = { | |
| "clock": (16, 60, 368, 196), | |
| "weather": (16, 212, 240, 344), | |
| "music": (256, 212, 368, 344), | |
| "tip": (16, 360, 368, 428), | |
| } | |
| DOCK_Y0, DOCK_Y1 = 452, 566 # icons circles r=30 cy=498; labels y 556 | |
| DOCK_XS = [68, 152, 236, 320] | |
| APPS_PILL = (16, 584, 368, 640) | |
| DRAWER_SEARCH = (16, 36, 368, 80) | |
| DRAWER_Y0 = 104 # grid 3x4, cell 117x130 | |
| DRAWER_CELL_W, DRAWER_CELL_H = 117, 130 | |
| DRAWER_APPS = ["Rechner", "Wetter", "Musik", "Einstellungen", "Info", "Notizen", | |
| "Galerie", "Uhr", "Browser", "Kamera", "Spiele", "Dateien"] | |
| CALC_DISP = (16, 40, 368, 150) | |
| CALC_GRID = (16, 166, 368, 700) | |
| CALC_KEYS = [["C", "±", "%", "÷"], | |
| ["7", "8", "9", "×"], | |
| ["4", "5", "6", "−"], | |
| ["1", "2", "3", "+"], | |
| ["0", ".", "⌫", "="]] | |
| WEATHER_CITY_Y = 44 | |
| WEATHER_TEMP = (16, 66) # big temp top-left x,y | |
| WEATHER_ANIM = (16, 210, 368, 420) # condition animation zone | |
| WEATHER_HOURLY = (16, 436, 368, 540) # 5 mini cards | |
| WEATHER_DETAIL = (16, 556, 368, 700) | |
| MUSIC_ART = (92, 56, 292, 256) | |
| MUSIC_TITLE_Y = 288 | |
| MUSIC_ARTIST_Y = 314 | |
| MUSIC_PROG = (32, 348, 352, 364) | |
| MUSIC_SPEC = (16, 392, 368, 560) # 24 spectrum bars | |
| MUSIC_CTRL_Y0, MUSIC_CTRL_Y1 = 590, 700 | |
| MUSIC_CTRL_XS = [86, 192, 298] # prev, play, next (r=34) | |
| SETTINGS_HUE_Y = (92, 144) # 12 swatches 28px, x = 16 + i*29.3 | |
| SETTINGS_ROWS = [("WLAN", 0), ("Bluetooth", 1), ("KI-Effekte", 2), ("Energie sparen", 3)] | |
| SETTINGS_ROW_Y0 = 170 | |
| SETTINGS_ROW_H, SETTINGS_ROW_GAP = 50, 14 | |
| SETTINGS_TOGGLE = (300, 352) # track x range | |
| SETTINGS_INFO_Y0 = 442 # npu status card + diagnose card | |
| SETTINGS_CARD_H = 78 | |
| CITIES = ["Berlin", "Hamburg", "München", "Köln"] | |
| CONDS = ["Sonnig", "Wolkig", "Regen", "Klar Nacht"] | |
| MUSIC_TRACKS = [("Neon Horizont", "KillerBoss"), ("NPU Dreams", "Hexagon"), | |
| ("Deep Blue", "Aurora Kids")] | |
| TOASTS = ["WLAN verbunden", "Update bereit", "Modus aktiv", "Effekte an", "Speicher frei"] | |
| TOAST_RECT = (72, 716, 312, 756) | |
| # effect params (styled theme) | |
| SHADOW_DY, SHADOW_BLUR, SHADOW_A = 6, 9, 0.38 | |
| GLOW_BLUR = 10 | |
| RIPPLE_W = 5 | |