Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=artwork.git;a=commitdiff;h=2f588de1fecd04e4cbc0b6af6278e413e3dd0a35

commit 2f588de1fecd04e4cbc0b6af6278e413e3dd0a35
Author: Devil505 <devil505li...@gmail.com>
Date:   Wed May 11 20:47:35 2011 +0200

* initial import of plymouth-theme-frugalware

diff --git a/DESCRIPTION b/DESCRIPTION
index 1db1ec5..067e76e 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -13,6 +13,7 @@ lock-dialog-frugalware                        Theme for Gnome 
lock dialog screensaver
logo                                    Frugalware logo + variants
lxde-frugalware                         LXDE Artwork
pekwm-themes                            Themes for Pekwm
+plymouth-theme-frugalware              Plymouth theme for Frugalware
sawfish-themes                          Themes for Sawfish
slim-theme                              Frugalware theme for Slim
splashy-theme                           Theme for Splashy
diff --git a/plymouth-theme-frugalware/box.png 
b/plymouth-theme-frugalware/box.png
new file mode 100644
index 0000000..1f9f242
Binary files /dev/null and b/plymouth-theme-frugalware/box.png differ
diff --git a/plymouth-theme-frugalware/bullet.png 
b/plymouth-theme-frugalware/bullet.png
new file mode 100755
index 0000000..55c25bc
Binary files /dev/null and b/plymouth-theme-frugalware/bullet.png differ
diff --git a/plymouth-theme-frugalware/entry.png 
b/plymouth-theme-frugalware/entry.png
new file mode 100644
index 0000000..91cb23a
Binary files /dev/null and b/plymouth-theme-frugalware/entry.png differ
diff --git a/plymouth-theme-frugalware/frugalware.plymouth 
b/plymouth-theme-frugalware/frugalware.plymouth
new file mode 100755
index 0000000..348d005
--- /dev/null
+++ b/plymouth-theme-frugalware/frugalware.plymouth
@@ -0,0 +1,10 @@
+[Plymouth Theme]
+Name=Frugalware
+Description=Paw theme modified for Frugalware Linux
+ModuleName=script
+
+[script]
+ImageDir=/usr/share/plymouth/themes/frugalware
+ScriptFile=/usr/share/plymouth/themes/paw-arch/frugalware.script
+
+
diff --git a/plymouth-theme-frugalware/frugalware.script 
b/plymouth-theme-frugalware/frugalware.script
new file mode 100755
index 0000000..d336959
--- /dev/null
+++ b/plymouth-theme-frugalware/frugalware.script
@@ -0,0 +1,181 @@
+/* For startup we want a light theme with a throbber */
+if ( Plymouth.GetMode () == "boot" )
+  {
+    Window.SetBackgroundTopColor (0.75, 0.75, 0.75);
+    Window.SetBackgroundBottomColor (0.75, 0.75, 0.75);
+
+    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);
+    progress = 0;
+
+    progress_box.image = Image("throbber-0" + progress + ".png");
+    progress_box.sprite = Sprite();
+    progress_box.x = Window.GetWidth() / 2 - progress_box.image.GetWidth()  / 
2;
+    progress_box.y = Window.GetHeight() * 0.75 - 
progress_box.image.GetHeight() / 2;
+    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.75, 0.75, 0.75);
+    Window.SetBackgroundBottomColor (0.75, 0.75, 0.75);
+
+    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 ()
+  {
+    /* Again at startup we want a throbber */
+    mode = Plymouth.GetMode ();
+    if (status == "normal" && mode == "boot" )
+      {
+        progress++;
+
+        if (progress >= 10)
+          progress = 0;
+
+        new_progress_box.image = Image("throbber-0" + progress + ".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;
+    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);
+      }
+  }
+
+Plymouth.SetDisplayNormalFunction(display_normal_callback);
+Plymouth.SetDisplayPasswordFunction(display_password_callback);
+
+/*                                       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/plymouth-theme-frugalware/lock.png 
b/plymouth-theme-frugalware/lock.png
new file mode 100644
index 0000000..5b0de6a
Binary files /dev/null and b/plymouth-theme-frugalware/lock.png differ
diff --git a/plymouth-theme-frugalware/logo-alt.png 
b/plymouth-theme-frugalware/logo-alt.png
new file mode 100644
index 0000000..a9c5fd5
Binary files /dev/null and b/plymouth-theme-frugalware/logo-alt.png differ
diff --git a/plymouth-theme-frugalware/logo.png 
b/plymouth-theme-frugalware/logo.png
new file mode 100644
index 0000000..6042a6e
Binary files /dev/null and b/plymouth-theme-frugalware/logo.png differ
diff --git a/plymouth-theme-frugalware/throbber-00.png 
b/plymouth-theme-frugalware/throbber-00.png
new file mode 100755
index 0000000..d57bbdc
Binary files /dev/null and b/plymouth-theme-frugalware/throbber-00.png differ
diff --git a/plymouth-theme-frugalware/throbber-01.png 
b/plymouth-theme-frugalware/throbber-01.png
new file mode 100755
index 0000000..c529a1d
Binary files /dev/null and b/plymouth-theme-frugalware/throbber-01.png differ
diff --git a/plymouth-theme-frugalware/throbber-010.png 
b/plymouth-theme-frugalware/throbber-010.png
new file mode 100755
index 0000000..9cb0b9c
Binary files /dev/null and b/plymouth-theme-frugalware/throbber-010.png differ
diff --git a/plymouth-theme-frugalware/throbber-011.png 
b/plymouth-theme-frugalware/throbber-011.png
new file mode 100755
index 0000000..64721e5
Binary files /dev/null and b/plymouth-theme-frugalware/throbber-011.png differ
diff --git a/plymouth-theme-frugalware/throbber-02.png 
b/plymouth-theme-frugalware/throbber-02.png
new file mode 100755
index 0000000..cf15743
Binary files /dev/null and b/plymouth-theme-frugalware/throbber-02.png differ
diff --git a/plymouth-theme-frugalware/throbber-03.png 
b/plymouth-theme-frugalware/throbber-03.png
new file mode 100755
index 0000000..5e9e5bf
Binary files /dev/null and b/plymouth-theme-frugalware/throbber-03.png differ
diff --git a/plymouth-theme-frugalware/throbber-04.png 
b/plymouth-theme-frugalware/throbber-04.png
new file mode 100755
index 0000000..b06d826
Binary files /dev/null and b/plymouth-theme-frugalware/throbber-04.png differ
diff --git a/plymouth-theme-frugalware/throbber-05.png 
b/plymouth-theme-frugalware/throbber-05.png
new file mode 100755
index 0000000..2d64dc9
Binary files /dev/null and b/plymouth-theme-frugalware/throbber-05.png differ
diff --git a/plymouth-theme-frugalware/throbber-06.png 
b/plymouth-theme-frugalware/throbber-06.png
new file mode 100755
index 0000000..efc5d08
Binary files /dev/null and b/plymouth-theme-frugalware/throbber-06.png differ
diff --git a/plymouth-theme-frugalware/throbber-07.png 
b/plymouth-theme-frugalware/throbber-07.png
new file mode 100755
index 0000000..59bee98
Binary files /dev/null and b/plymouth-theme-frugalware/throbber-07.png differ
diff --git a/plymouth-theme-frugalware/throbber-08.png 
b/plymouth-theme-frugalware/throbber-08.png
new file mode 100755
index 0000000..8122164
Binary files /dev/null and b/plymouth-theme-frugalware/throbber-08.png differ
diff --git a/plymouth-theme-frugalware/throbber-09.png 
b/plymouth-theme-frugalware/throbber-09.png
new file mode 100755
index 0000000..061ec91
Binary files /dev/null and b/plymouth-theme-frugalware/throbber-09.png differ
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to