Интегрирован wesp в сайт
CI / quality (push) Canceled after 0s

This commit is contained in:
влад
2026-07-17 12:57:18 +03:00
parent 5dfa06ddbe
commit 355c0ef9f1
883 changed files with 194576 additions and 177 deletions
@@ -0,0 +1,4 @@
# Пример sudoers для кнопки «Plymouth → установить» в админке WESP.
# Скопируйте в /etc/sudoers.d/wesp-plymouth (visudo -f ...) и замените USER и путь.
#
# wesp ALL=(root) NOPASSWD: /opt/wesp/scripts/plymouth/install_wesp_theme.sh *
@@ -0,0 +1,8 @@
[Plymouth Theme]
Name=WESP
Description=WESP boot splash (800x600 pixel logo animation)
ModuleName=script
[script]
ImageDir=/usr/share/plymouth/themes/wesp
ScriptFile=/usr/share/plymouth/themes/wesp/wesp.script
@@ -0,0 +1,44 @@
# WESP Plymouth theme — полноэкранная анимация 800×600 (кадры animation/N.png)
screen.width = Window.GetWidth();
screen.height = Window.GetHeight();
# Тёмный фон (#0f1114), как data-theme="dark"
Window.SetBackgroundTopColor(0.0588, 0.0667, 0.0784);
Window.SetBackgroundBottomColor(0.0588, 0.0667, 0.0784);
animation.length = 0;
animation.images = [];
while (1) {
local.path = "animation/" + animation.length + ".png";
local.frame = Image(local.path);
if (!frame)
break;
animation.images[animation.length++] = frame;
}
animation.current_frame = 0;
animation.sprite = Sprite();
fun refresh_callback() {
if (animation.length == 0)
return;
local.frame = animation.images[animation.current_frame];
animation.sprite.SetImage(frame);
# Кадры 800×600 — на других разрешениях центрируем
animation.sprite.SetX((screen.width - frame.GetWidth()) / 2);
animation.sprite.SetY((screen.height - frame.GetHeight()) / 2);
animation.current_frame++;
if (animation.current_frame >= animation.length)
animation.current_frame = 0;
}
Plymouth.SetRefreshFunction(refresh_callback);
fun quit_callback() {}
Plymouth.SetQuitFunction(quit_callback);