2018-08-22 19:15:32 +00:00
|
|
|
import logging
|
2024-10-28 19:48:28 +00:00
|
|
|
from dataclasses import dataclass
|
|
|
|
from typing import Union, List
|
2018-08-19 18:47:08 +00:00
|
|
|
|
2024-10-28 19:48:28 +00:00
|
|
|
|
|
|
|
@dataclass
|
|
|
|
class AppConfig:
|
|
|
|
guiname: str
|
|
|
|
name: str
|
|
|
|
cmd: Union[List[str], str]
|
|
|
|
path: str = "./apps/"
|
|
|
|
persistent: bool = False
|
|
|
|
white: bool = False
|
|
|
|
|
|
|
|
def __post_init__(self):
|
|
|
|
if not isinstance(self.cmd, list):
|
|
|
|
self.cmd = [self.cmd]
|
|
|
|
|
|
|
|
|
|
|
|
# width
|
2018-10-21 13:19:51 +00:00
|
|
|
ScreenX = 80
|
2024-10-28 19:48:28 +00:00
|
|
|
# height
|
2018-08-19 18:47:08 +00:00
|
|
|
ScreenY = 40
|
|
|
|
|
2024-10-28 17:10:03 +00:00
|
|
|
DefaultBrightness = 0.6
|
2019-01-01 11:49:26 +00:00
|
|
|
|
2018-08-22 16:04:04 +00:00
|
|
|
Serial = "/dev/ttyACM0"
|
|
|
|
|
2018-08-22 16:48:43 +00:00
|
|
|
# kills app after some seconds if it sends no data
|
2018-09-10 17:14:05 +00:00
|
|
|
NoDataTimeout = 40
|
2018-08-22 17:23:36 +00:00
|
|
|
|
2018-08-22 19:15:32 +00:00
|
|
|
LogLevel = logging.DEBUG
|
|
|
|
|
2024-10-28 19:48:28 +00:00
|
|
|
UseGui = False
|
2024-10-28 17:10:03 +00:00
|
|
|
GuiFPS = 20
|
2018-10-21 13:19:51 +00:00
|
|
|
GuiScaleFactor = 15
|
2018-08-25 20:46:56 +00:00
|
|
|
|
2018-10-21 13:19:51 +00:00
|
|
|
WebHost = "0.0.0.0"
|
2018-08-25 20:46:56 +00:00
|
|
|
WebPort = 8000
|
2018-08-22 16:48:43 +00:00
|
|
|
|
2018-08-19 18:47:08 +00:00
|
|
|
Apps = [
|
2024-10-28 19:48:28 +00:00
|
|
|
# first app is always running as default
|
|
|
|
AppConfig(guiname="Backlight", name="backlight", cmd="./backlight.py", white=True),
|
|
|
|
|
|
|
|
AppConfig(guiname="Lines", name="lines", cmd="./lines.py"),
|
|
|
|
AppConfig(guiname="Wolfram", name="wolfram", cmd="./wolfram.py"),
|
|
|
|
AppConfig(guiname="Digi Clock", name="digiclock", cmd="./digi_clock.py"),
|
|
|
|
AppConfig(guiname="Text Scroller MQTT", name="textscroll", cmd="./textscroll.py"),
|
|
|
|
AppConfig(guiname="Flicker", name="flicker", cmd="./flicker"),
|
|
|
|
|
|
|
|
AppConfig(guiname="Pixelflut", name="pixelflut", cmd="./pixelflut", persistent=True),
|
|
|
|
# App(guiname="Pong", name="pong", cmd="pong.py"),
|
|
|
|
AppConfig(guiname="YoutubeDL", name="youtubedl", cmd="./youtubedl.sh"),
|
|
|
|
# App(guiname="Show Framebuffer", name="fbcp", cmd=["fbcp", "/dev/fb0"]),
|
|
|
|
AppConfig(guiname="Strobo", name="strobo", cmd="./strobo.py"),
|
|
|
|
# App(guiname="Beispiel", name="example", cmd="example.py"),
|
|
|
|
# App(guiname="Beispiel2", name="example2", cmd="example2.py", white=True),
|
|
|
|
AppConfig(guiname="Fibonacci Clock", name="fibonacci-clock", cmd="./fibonacci-clock.py"),
|
|
|
|
AppConfig(guiname="Wget Video/Gif/Images", name="wget", cmd="./wget.sh"),
|
2018-12-30 11:41:38 +00:00
|
|
|
|
2018-12-30 14:40:04 +00:00
|
|
|
# juergen/pixelfoo
|
2024-10-28 19:48:28 +00:00
|
|
|
AppConfig(guiname="Congress noise", name="cnoise", cmd="./cnoise", path="pixelfoo/target/release/"),
|
|
|
|
AppConfig(guiname="Game of Life", name="life", cmd="./life", path="pixelfoo/target/release/"),
|
|
|
|
AppConfig(guiname="Matrix Code", name="matrix-code", cmd="./matrix-code", path="pixelfoo/target/release/"),
|
|
|
|
AppConfig(guiname="Lorenz Attractor", name="lorenz", cmd="./lorenz", path="pixelfoo/target/release/"),
|
|
|
|
AppConfig(guiname="Dual Moodlight", name="bimood", cmd="./bimood", path="pixelfoo/target/release/"),
|
|
|
|
AppConfig(guiname="Maze", name="maze", cmd="./maze", path="pixelfoo/target/release/"),
|
|
|
|
AppConfig(guiname="Dual Maze", name="dualmaze", cmd="./dualmaze", path="pixelfoo/target/release/"),
|
|
|
|
AppConfig(guiname="Predator & Prey", name="predprey", cmd="./predprey", path="pixelfoo/target/release/"),
|
2024-10-28 17:10:03 +00:00
|
|
|
|
2024-10-28 19:48:28 +00:00
|
|
|
# App(guiname="Beat Saber Ceiling", name="beatsaberceiling", cmd="./beatsaberceiling.py", path="beatsaberceiling"),
|
2024-10-28 17:10:03 +00:00
|
|
|
|
|
|
|
# mathpixel
|
2024-10-28 19:48:28 +00:00
|
|
|
AppConfig(guiname="Structure formation", name="swifthohenberg", cmd="./swifthohenberg.py"),
|
|
|
|
AppConfig(guiname="Quadratisch", name="quadratic", cmd="./quadratic.py"),
|
|
|
|
AppConfig(guiname="Pendel", name="pendulum", cmd="./pendlum.py"),
|
|
|
|
AppConfig(guiname="Konvergenz", name="convergence", cmd="./convergence.py"),
|
|
|
|
AppConfig(guiname="Sinic", name="sinic", cmd="./sinic.py"),
|
|
|
|
AppConfig(guiname="Sinic 2", name="sinic2", cmd="./sinic2.py"),
|
2018-12-30 14:40:04 +00:00
|
|
|
|
2024-10-28 17:10:03 +00:00
|
|
|
# pixelthud
|
2024-10-28 19:48:28 +00:00
|
|
|
AppConfig(guiname="Fading Pixels", name="fadingpxls", cmd="./fading_pixels.py"),
|
|
|
|
AppConfig(guiname="Plane Wave", name="planewave", cmd="./plane_wave.py"),
|
|
|
|
AppConfig(guiname="Rock-paper-scissors-spock-lizard", name="rps", cmd="./rps.py"),
|
|
|
|
AppConfig(guiname="Doom Fire", name="doomfire", cmd="./doom_fire_psx2.py"),
|
|
|
|
# App(guiname="Maxwell FDTD", name="fdtd", cmd="./fdtd.py"),
|
|
|
|
|
|
|
|
# App(guiname="Stream", name="stream", cmd="./stream.sh"),
|
|
|
|
# App(guiname="Wget Video/Gif/Images", name="wget", cmd="./wget.sh"),
|
|
|
|
# App(guiname="Tetris", name="tetris", cmd="./deckentetris/deckentetris.py"),
|
|
|
|
# App(guiname="SkyScrapper", name="sky", cmd="./weather/main.py"),
|
|
|
|
# App(guiname="Strobo", name="strobo", cmd="./strobo.py"),
|
|
|
|
# App(guiname="Snake", name="snake", cmd="./snake.py"),
|
|
|
|
# App(name="gif", cmd="./gif.sh"),
|
|
|
|
# App(name="colormap", cmd="./colormap.py"),
|
|
|
|
]
|