-
Notifications
You must be signed in to change notification settings - Fork 601
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core-initrd: un-vendor UC plymouth theme
As we will keep any difference between initramfs in the snapd repo, it does not make sense anymore to keep the plymouth theme in a separate repository.
- Loading branch information
1 parent
eba73ad
commit be847a8
Showing
36 changed files
with
165 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The ubuntu-core theme for plymouth was originally in https://github.com/canonical/plymouth-theme-ubuntu-core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | ||
Upstream-Name: Plymouth | ||
Upstream-Contact: [email protected] | ||
Source: http://www.freedesktop.org/software/plymouth/releases/ | ||
|
||
Files: * | ||
Copyright: 2022 Canonical Ltd. | ||
License: GPL-2+ | ||
|
||
Files: ubuntu-core/throbber-*.png | ||
Copyright: 2006-2008 Red Hat, Inc. | ||
2007-2008 Ray Strode <[email protected]> | ||
2003 University of Southern California | ||
2003 Charlie Brej <[email protected]> | ||
License: GPL-2+ | ||
|
||
License: GPL-2+ | ||
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 of the License, 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, see <http://www.gnu.org/licenses/>. | ||
. | ||
The complete text of the GNU General Public License | ||
can be found in /usr/share/common-licenses/GPL-2 file. |
Binary file added
BIN
+1.22 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.2 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.25 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.22 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.26 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.24 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.23 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.21 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.22 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.24 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.23 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.21 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.25 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.22 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-21.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.26 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-22.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.23 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-23.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.2 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.22 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-25.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.27 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-26.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.21 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-27.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.25 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-28.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.22 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-29.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.23 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.24 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-30.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.25 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.23 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-5.png
Oops, something went wrong.
Binary file added
BIN
+1.25 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-6.png
Oops, something went wrong.
Binary file added
BIN
+1.27 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-7.png
Oops, something went wrong.
Binary file added
BIN
+1.23 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-8.png
Oops, something went wrong.
Binary file added
BIN
+1.19 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/throbber-9.png
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/ubuntu-core.plymouth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[Plymouth Theme] | ||
Name=Ubuntu Core | ||
Description=The default theme for Ubuntu Core. | ||
ModuleName=script | ||
|
||
[script] | ||
ImageDir=/ | ||
ScriptFile=/usr/share/plymouth/themes/ubuntu-core/ubuntu-core.script |
Binary file added
BIN
+23.8 KB
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/ubuntu-core.png
Oops, something went wrong.
120 changes: 120 additions & 0 deletions
120
core-initrd/latest/plymouth-theme-ubuntu-core/ubuntu-core/ubuntu-core.script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
# 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); |