1
0
Fork 0
mirror of https://gitlab.com/echtnurich/windozexp-enhanced.git synced 2024-11-12 19:21:02 +01:00
This commit is contained in:
echtnurich 2023-11-23 22:39:32 +01:00
commit a9028f3bc1
54 changed files with 208 additions and 0 deletions

11
README.md Normal file
View file

@ -0,0 +1,11 @@
# WindozeXP-enhanced
Forked from WindozeXP
Better throbber and decrypt field
## TODO
- copy to /usr/share/plymouth/themes/WindozeXP
- chown -R root the folder
- sudo plymouth-set-default-theme -R WindozeXP

10
WindozeXP.plymouth Normal file
View file

@ -0,0 +1,10 @@
[Plymouth Theme]
Name=WindozeXP
Description=plymouth
ModuleName=script
[script]
ImageDir=/usr/share/plymouth/themes/WindozeXP
ScriptFile=/usr/share/plymouth/themes/WindozeXP/WindozeXP.script

187
WindozeXP.script Normal file
View file

@ -0,0 +1,187 @@
/* For startup we want a light theme with a throbber */
if ( Plymouth.GetMode () == "boot" )
{
Window.SetBackgroundTopColor (0.0, 0.0, 0.0);
Window.SetBackgroundBottomColor (0.0, 0.0, 0.0);
logo.image = Image("logo.png");
logo.sprite = Sprite(logo.image);
logo.sprite.SetX (Window.GetWidth() / 2 - logo.image.GetWidth() / 2);
logo.sprite.SetY (Window.GetHeight() / 2 - logo.image.GetHeight() / 2);
logo.sprite.SetZ (10000);
logo.sprite.SetOpacity (1);
progress = 0;
decrypted = 0;
progress_box.image = Image("throbber-038.png");
progress_box.sprite = Sprite();
progress_box.x = Window.GetWidth() / 2 - progress_box.image.GetWidth() / 2 - 2;
progress_box.y = Window.GetHeight() / 2 - progress_box.image.GetHeight() / 2 + 117;
progress_box.sprite.SetPosition(progress_box.x, progress_box.y, 0);
progress_box.sprite.SetImage(progress_box.image);
}
/* In every other case we just want a pulsing logo */
else
{
Window.SetBackgroundTopColor (0.0, 0.0, 0.0);
Window.SetBackgroundBottomColor (0.0, 0.0, 0.0);
logo.image = Image("logo-alt.png");
logo.sprite = Sprite(logo.image);
logo.opacity_angle = 0;
}
/* This function gets called continuosly by Plymouth, up to 50 times a second */
fun refresh ()
{
/* load the image after unlock */
//logo.sprite.SetOpacity (1);
/* Again at startup we want a throbber */
mode = Plymouth.GetMode ();
if (status == "normal" && mode == "boot" )
{
progress++;
if (progress >= 89)
progress = 0;
new_progress_box.image = Image("throbber-0" + progress/2 + ".png");
progress_box.sprite.SetImage(new_progress_box.image);
progress_box.sprite.SetOpacity(1);
}
/* If we're in startup mode but status is not "normal" it probably means that
* some event is taking place, possibly a request for password, or maybe
* something failed, in any case we should just hide our throbber */
else if (status != "normal" && mode == "boot" )
{
progress_box.sprite.SetOpacity(0);
}
/* If we've gotten here it means the system is shutting down, restarting,
* suspending, resuming from suspend or we just don't know wtf's going on. :-D
*
* In any mode other than startup we just want to display a light pulsing logo
* on a dark background not only to differentiate it from startup but also to
* allow the user to read any messages printed by Plymouth */
else
{
logo.opacity_angle += ((2 * 3.14) / 50) * 0.5; # 0.5 HZ
min_opacity = 0.3;
opacity = (Math.Cos(logo.opacity_angle) + 1) / 2;
opacity *= 1 - min_opacity;
opacity += min_opacity;
logo.sprite.SetX (Window.GetWidth() / 2 - logo.image.GetWidth() / 2);
logo.sprite.SetY (Window.GetHeight() / 2 - logo.image.GetHeight() / 2);
logo.sprite.SetOpacity (opacity);
}
}
Plymouth.SetRefreshFunction (refresh);
/* Dialogue */
status = "normal";
fun dialog_setup()
{
local.box;
local.lock;
local.entry;
box.image = Image("box.png");
lock.image = Image("lock.png");
entry.image = Image("entry.png");
box.sprite = Sprite(box.image);
box.x = Window.GetWidth() / 2 - box.image.GetWidth ()/2;
box.y = Window.GetHeight() / 2 - box.image.GetHeight()/2 + 117;
box.z = 10000;
box.sprite.SetPosition(box.x, box.y, box.z);
lock.sprite = Sprite(lock.image);
lock.x = box.x + box.image.GetWidth()/2 - (lock.image.GetWidth() + entry.image.GetWidth()) / 2;
lock.y = box.y + box.image.GetHeight()/2 - lock.image.GetHeight()/2;
lock.z = box.z + 1;
lock.sprite.SetPosition(lock.x, lock.y, lock.z);
entry.sprite = Sprite(entry.image);
entry.x = lock.x + lock.image.GetWidth();
entry.y = box.y + box.image.GetHeight()/2 - entry.image.GetHeight()/2;
entry.z = box.z + 1;
entry.sprite.SetPosition(entry.x, entry.y, entry.z);
global.dialog.box = box;
global.dialog.lock = lock;
global.dialog.entry = entry;
global.dialog.bullet_image = Image("bullet.png");
dialog_opacity (1);
}
fun dialog_opacity(opacity)
{
dialog.box.sprite.SetOpacity (opacity);
dialog.lock.sprite.SetOpacity (opacity);
dialog.entry.sprite.SetOpacity (opacity);
for (index = 0; dialog.bullet[index]; index++)
{
dialog.bullet[index].sprite.SetOpacity(opacity);
}
}
fun display_normal_callback ()
{
global.status = "normal";
if (global.dialog)
dialog_opacity (0);
}
fun display_password_callback (prompt, bullets)
{
global.status = "password";
if (!global.dialog)
dialog_setup();
else
dialog_opacity(1);
for (index = 0; dialog.bullet[index] || index < bullets; index++)
{
if (!dialog.bullet[index])
{
dialog.bullet[index].sprite = Sprite(dialog.bullet_image);
dialog.bullet[index].x = dialog.entry.x + index * dialog.bullet_image.GetWidth();
dialog.bullet[index].y = dialog.entry.y + dialog.entry.image.GetHeight() / 2 - dialog.bullet_image.GetHeight() / 2;
dialog.bullet[index].z = dialog.entry.z + 1;
dialog.bullet[index].sprite.SetPosition(dialog.bullet[index].x, dialog.bullet[index].y, dialog.bullet[index].z);
}
if (index < bullets)
dialog.bullet[index].sprite.SetOpacity(1);
else
dialog.bullet[index].sprite.SetOpacity(0);
//decrypted = 1;
}
}
//logo.sprite.SetOpacity (0);
Plymouth.SetDisplayNormalFunction(display_normal_callback);
Plymouth.SetDisplayPasswordFunction(display_password_callback);
//logo.sprite.SetOpacity (1);
/* Quit */
fun quit_callback ()
{
logo.sprite.SetOpacity (1);
}
Plymouth.SetQuitFunction(quit_callback);
/* Message */
message_sprite = Sprite();
message_sprite.SetPosition(10, 10, 10000);
fun message_callback (text)
{
my_image = Image.Text(text, 1, 1, 1);
message_sprite.SetImage(my_image);
}
Plymouth.SetMessageFunction(message_callback);

BIN
box.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
bullet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

BIN
entry.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

BIN
lock.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
logo-alt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

BIN
logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

BIN
throbber-00.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-010.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-011.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-012.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-013.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-014.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-015.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-016.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-017.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-018.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-019.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-020.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-021.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-022.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-023.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-024.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-025.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-026.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-027.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-028.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-029.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-03.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-030.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-031.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-032.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-033.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
throbber-034.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
throbber-035.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
throbber-036.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
throbber-037.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
throbber-038.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
throbber-039.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
throbber-04.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-040.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
throbber-041.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
throbber-042.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
throbber-043.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
throbber-044.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
throbber-05.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-06.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-07.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-08.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
throbber-09.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB