__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
# ubuntu-core.script - boot splash plugin
#
# Copyright (C) 2022 Canonical Ltd.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
fun WriteText(text, colour)
{
# Ubuntu Font
font = "Ubuntu, sans-serif 16";
font_alignment = "center";
image = Image.Text(text, colour.red, colour.green, colour.blue, colour.alpha,
font, font_alignment);
}
fun message_callback(message)
{
text_img = WriteText(message, white);
# Text centered in last quarter of the screen
text.x = Window.GetX() + (Window.GetWidth() - text_img.GetWidth())/2;
text.y = Window.GetY() + 7*Window.GetHeight()/8 - text_img.GetHeight() - 10;
text_sprite.SetImage(text_img);
# x,y,z position
text_sprite.SetPosition(text.x, text.y, 2000);
# debug_img = Image.Text("Width: " + text_img.GetWidth(),
# white.red, white.green, white.blue, white.alpha);
# debug_sprite.SetImage(debug_img);
# debug_sprite.SetPosition(Window.GetX()+10,Window.GetY() + 10, 2000);
}
# Called 50 times every second.
# NOTE: if a refresh function is not set, Plymouth doesn't seem to be able to
# update the screen correctly. This happens, for instance, when getty
# takes control of the screen. We need to update with the splash at
# that moment (also, this produces a blink). Calling again SetImage
# is needed for the update to happen.
fun refresh_callback()
{
logo.sprite.SetImage(logo.image);
logo.sprite.SetPosition(logo.x, logo.y, logo.z);
logo.sprite.SetOpacity(1);
# Spinner
if (++spin.frame_cnt % spin.refresh_rate == 0) {
if (++spin.idx == 31)
spin.idx = 1;
spin.image = Image(spin.base_name + spin.idx + ".png");
}
spin.sprite.SetImage(spin.image);
spin.sprite.SetPosition(spin.x, spin.y, spin.z);
spin.sprite.SetOpacity(1);
if (uc_logo.raw_image != NULL) {
uc_logo.sprite.SetImage(uc_logo.image);
uc_logo.sprite.SetPosition(uc_logo.x, uc_logo.y, uc_logo.z);
uc_logo.sprite.SetOpacity(1);
}
}
white.red = 1.0;
white.green = 1.0;
white.blue = 1.0;
# Warning: Sprites need to be global variables, apparently
text_sprite = Sprite();
#debug_sprite = Sprite();
logo.raw_image = Image("run/mnt/gadget/splash/vendor-logo.png");
uc_logo.raw_image = NULL;
if (logo.raw_image == NULL) {
logo.raw_image = Image("usr/share/plymouth/themes/ubuntu-core/ubuntu-core.png");
} else {
uc_logo.raw_image = Image("usr/share/plymouth/themes/ubuntu-core/ubuntu-core.png");
uc_logo_w = Window.GetWidth()/5;
uc_logo.image = uc_logo.raw_image.Scale(uc_logo_w,
uc_logo_w*uc_logo.raw_image.GetHeight()/uc_logo.raw_image.GetWidth());
uc_logo.sprite = Sprite();
# Logo touching the top and in the last 8th of the screen
uc_logo.x = Window.GetX() + Window.GetWidth()/2 - uc_logo.image.GetWidth()/2;
uc_logo.y = Window.GetY() + 7*Window.GetHeight()/8;
uc_logo.z = 100;
}
logo_w = 2*Window.GetWidth()/3;
logo.image = logo.raw_image.Scale(logo_w, logo_w*logo.raw_image.GetHeight()/logo.raw_image.GetWidth());
logo.sprite = Sprite();
# Logo right on top of the low-half of the screen
logo.x = Window.GetX() + Window.GetWidth()/2 - logo.image.GetWidth()/2;
logo.y = Window.GetY() + Window.GetHeight()/2 - logo.image.GetHeight();
logo.z = 100;
spin.base_name = "usr/share/plymouth/themes/ubuntu-core/throbber-";
spin.idx = 1;
spin.refresh_rate = 5;
spin.frame_cnt = 0;
spin.image = Image(spin.base_name + spin.idx + ".png");
spin.sprite = Sprite();
# Spin between third and fourth quarters
spin.x = Window.GetX() + Window.GetWidth()/2 - spin.image.GetWidth()/2;
spin.y = Window.GetY() + 3*Window.GetHeight()/4 - spin.image.GetHeight()/2;
spin.z = 100;
refresh_callback();
Plymouth.SetMessageFunction(message_callback);
Plymouth.SetRefreshFunction(refresh_callback);
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| throbber-1.png | File | 1.22 KB | 0644 |
|
| throbber-10.png | File | 1.2 KB | 0644 |
|
| throbber-11.png | File | 1.25 KB | 0644 |
|
| throbber-12.png | File | 1.22 KB | 0644 |
|
| throbber-13.png | File | 1.26 KB | 0644 |
|
| throbber-14.png | File | 1.24 KB | 0644 |
|
| throbber-15.png | File | 1.23 KB | 0644 |
|
| throbber-16.png | File | 1.21 KB | 0644 |
|
| throbber-17.png | File | 1.22 KB | 0644 |
|
| throbber-18.png | File | 1.24 KB | 0644 |
|
| throbber-19.png | File | 1.23 KB | 0644 |
|
| throbber-2.png | File | 1.21 KB | 0644 |
|
| throbber-20.png | File | 1.25 KB | 0644 |
|
| throbber-21.png | File | 1.22 KB | 0644 |
|
| throbber-22.png | File | 1.26 KB | 0644 |
|
| throbber-23.png | File | 1.23 KB | 0644 |
|
| throbber-24.png | File | 1.2 KB | 0644 |
|
| throbber-25.png | File | 1.22 KB | 0644 |
|
| throbber-26.png | File | 1.27 KB | 0644 |
|
| throbber-27.png | File | 1.21 KB | 0644 |
|
| throbber-28.png | File | 1.25 KB | 0644 |
|
| throbber-29.png | File | 1.22 KB | 0644 |
|
| throbber-3.png | File | 1.23 KB | 0644 |
|
| throbber-30.png | File | 1.24 KB | 0644 |
|
| throbber-4.png | File | 1.25 KB | 0644 |
|
| throbber-5.png | File | 1.23 KB | 0644 |
|
| throbber-6.png | File | 1.25 KB | 0644 |
|
| throbber-7.png | File | 1.27 KB | 0644 |
|
| throbber-8.png | File | 1.23 KB | 0644 |
|
| throbber-9.png | File | 1.19 KB | 0644 |
|
| ubuntu-core.plymouth | File | 189 B | 0644 |
|
| ubuntu-core.png | File | 23.76 KB | 0644 |
|
| ubuntu-core.script | File | 4.42 KB | 0644 |
|