commit a9028f3bc16e18372e58b639de0401c9f4ab1c97 Author: echtnurich Date: Thu Nov 23 22:39:32 2023 +0100 upload diff --git a/README.md b/README.md new file mode 100644 index 0000000..190cd45 --- /dev/null +++ b/README.md @@ -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 diff --git a/WindozeXP.plymouth b/WindozeXP.plymouth new file mode 100644 index 0000000..38125ee --- /dev/null +++ b/WindozeXP.plymouth @@ -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 + + diff --git a/WindozeXP.script b/WindozeXP.script new file mode 100644 index 0000000..130b3f6 --- /dev/null +++ b/WindozeXP.script @@ -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); + diff --git a/box.png b/box.png new file mode 100644 index 0000000..ed556fa Binary files /dev/null and b/box.png differ diff --git a/bullet.png b/bullet.png new file mode 100644 index 0000000..55c25bc Binary files /dev/null and b/bullet.png differ diff --git a/entry.png b/entry.png new file mode 100644 index 0000000..22a67c7 Binary files /dev/null and b/entry.png differ diff --git a/lock.png b/lock.png new file mode 100644 index 0000000..a0f8c12 Binary files /dev/null and b/lock.png differ diff --git a/logo-alt.png b/logo-alt.png new file mode 100644 index 0000000..7e8ee48 Binary files /dev/null and b/logo-alt.png differ diff --git a/logo.png b/logo.png new file mode 100644 index 0000000..19a0578 Binary files /dev/null and b/logo.png differ diff --git a/throbber-00.png b/throbber-00.png new file mode 100644 index 0000000..5f94be3 Binary files /dev/null and b/throbber-00.png differ diff --git a/throbber-01.png b/throbber-01.png new file mode 100644 index 0000000..e778fe0 Binary files /dev/null and b/throbber-01.png differ diff --git a/throbber-010.png b/throbber-010.png new file mode 100644 index 0000000..8468a95 Binary files /dev/null and b/throbber-010.png differ diff --git a/throbber-011.png b/throbber-011.png new file mode 100644 index 0000000..fd0e823 Binary files /dev/null and b/throbber-011.png differ diff --git a/throbber-012.png b/throbber-012.png new file mode 100644 index 0000000..6de1c40 Binary files /dev/null and b/throbber-012.png differ diff --git a/throbber-013.png b/throbber-013.png new file mode 100644 index 0000000..a965db9 Binary files /dev/null and b/throbber-013.png differ diff --git a/throbber-014.png b/throbber-014.png new file mode 100644 index 0000000..7e3675e Binary files /dev/null and b/throbber-014.png differ diff --git a/throbber-015.png b/throbber-015.png new file mode 100644 index 0000000..cb5a9b5 Binary files /dev/null and b/throbber-015.png differ diff --git a/throbber-016.png b/throbber-016.png new file mode 100644 index 0000000..36baf78 Binary files /dev/null and b/throbber-016.png differ diff --git a/throbber-017.png b/throbber-017.png new file mode 100644 index 0000000..fcfedc7 Binary files /dev/null and b/throbber-017.png differ diff --git a/throbber-018.png b/throbber-018.png new file mode 100644 index 0000000..0d3b469 Binary files /dev/null and b/throbber-018.png differ diff --git a/throbber-019.png b/throbber-019.png new file mode 100644 index 0000000..c338181 Binary files /dev/null and b/throbber-019.png differ diff --git a/throbber-02.png b/throbber-02.png new file mode 100644 index 0000000..d4d0f79 Binary files /dev/null and b/throbber-02.png differ diff --git a/throbber-020.png b/throbber-020.png new file mode 100644 index 0000000..855fc4f Binary files /dev/null and b/throbber-020.png differ diff --git a/throbber-021.png b/throbber-021.png new file mode 100644 index 0000000..d702770 Binary files /dev/null and b/throbber-021.png differ diff --git a/throbber-022.png b/throbber-022.png new file mode 100644 index 0000000..ecaa760 Binary files /dev/null and b/throbber-022.png differ diff --git a/throbber-023.png b/throbber-023.png new file mode 100644 index 0000000..81ec4c6 Binary files /dev/null and b/throbber-023.png differ diff --git a/throbber-024.png b/throbber-024.png new file mode 100644 index 0000000..29d9b7f Binary files /dev/null and b/throbber-024.png differ diff --git a/throbber-025.png b/throbber-025.png new file mode 100644 index 0000000..9bcf941 Binary files /dev/null and b/throbber-025.png differ diff --git a/throbber-026.png b/throbber-026.png new file mode 100644 index 0000000..1538a32 Binary files /dev/null and b/throbber-026.png differ diff --git a/throbber-027.png b/throbber-027.png new file mode 100644 index 0000000..60881c2 Binary files /dev/null and b/throbber-027.png differ diff --git a/throbber-028.png b/throbber-028.png new file mode 100644 index 0000000..a911a32 Binary files /dev/null and b/throbber-028.png differ diff --git a/throbber-029.png b/throbber-029.png new file mode 100644 index 0000000..3aca14e Binary files /dev/null and b/throbber-029.png differ diff --git a/throbber-03.png b/throbber-03.png new file mode 100644 index 0000000..08be3a9 Binary files /dev/null and b/throbber-03.png differ diff --git a/throbber-030.png b/throbber-030.png new file mode 100644 index 0000000..8fde0ec Binary files /dev/null and b/throbber-030.png differ diff --git a/throbber-031.png b/throbber-031.png new file mode 100644 index 0000000..505a400 Binary files /dev/null and b/throbber-031.png differ diff --git a/throbber-032.png b/throbber-032.png new file mode 100644 index 0000000..6f3b0c2 Binary files /dev/null and b/throbber-032.png differ diff --git a/throbber-033.png b/throbber-033.png new file mode 100644 index 0000000..6df9334 Binary files /dev/null and b/throbber-033.png differ diff --git a/throbber-034.png b/throbber-034.png new file mode 100644 index 0000000..76c5b33 Binary files /dev/null and b/throbber-034.png differ diff --git a/throbber-035.png b/throbber-035.png new file mode 100644 index 0000000..394145a Binary files /dev/null and b/throbber-035.png differ diff --git a/throbber-036.png b/throbber-036.png new file mode 100644 index 0000000..849e67d Binary files /dev/null and b/throbber-036.png differ diff --git a/throbber-037.png b/throbber-037.png new file mode 100644 index 0000000..b68f218 Binary files /dev/null and b/throbber-037.png differ diff --git a/throbber-038.png b/throbber-038.png new file mode 100644 index 0000000..29ab050 Binary files /dev/null and b/throbber-038.png differ diff --git a/throbber-039.png b/throbber-039.png new file mode 100644 index 0000000..aedb0ac Binary files /dev/null and b/throbber-039.png differ diff --git a/throbber-04.png b/throbber-04.png new file mode 100644 index 0000000..ad4095b Binary files /dev/null and b/throbber-04.png differ diff --git a/throbber-040.png b/throbber-040.png new file mode 100644 index 0000000..1431c4c Binary files /dev/null and b/throbber-040.png differ diff --git a/throbber-041.png b/throbber-041.png new file mode 100644 index 0000000..486b684 Binary files /dev/null and b/throbber-041.png differ diff --git a/throbber-042.png b/throbber-042.png new file mode 100644 index 0000000..b8f67e5 Binary files /dev/null and b/throbber-042.png differ diff --git a/throbber-043.png b/throbber-043.png new file mode 100644 index 0000000..f2ae60f Binary files /dev/null and b/throbber-043.png differ diff --git a/throbber-044.png b/throbber-044.png new file mode 100644 index 0000000..e76f399 Binary files /dev/null and b/throbber-044.png differ diff --git a/throbber-05.png b/throbber-05.png new file mode 100644 index 0000000..87ed55a Binary files /dev/null and b/throbber-05.png differ diff --git a/throbber-06.png b/throbber-06.png new file mode 100644 index 0000000..c8d5dbd Binary files /dev/null and b/throbber-06.png differ diff --git a/throbber-07.png b/throbber-07.png new file mode 100644 index 0000000..22c5013 Binary files /dev/null and b/throbber-07.png differ diff --git a/throbber-08.png b/throbber-08.png new file mode 100644 index 0000000..7cb8374 Binary files /dev/null and b/throbber-08.png differ diff --git a/throbber-09.png b/throbber-09.png new file mode 100644 index 0000000..62aa08f Binary files /dev/null and b/throbber-09.png differ