Add deskOS Plymouth theme package
This commit is contained in:
16
packages/desk-os-plymouth/default.nix
Normal file
16
packages/desk-os-plymouth/default.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{stdenv}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "desk-os-plymouth";
|
||||
version = "0.0.1";
|
||||
|
||||
src = ./src;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
sed -i 's:\(^ImageDir=\)/usr:\1'"$out"':' desk-os.plymouth
|
||||
sed -i 's:\(^ScriptFile=\)/usr:\1'"$out"':' desk-os.plymouth
|
||||
mkdir -p $out/share/plymouth/themes/desk-os
|
||||
cp * $out/share/plymouth/themes/desk-os
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
||||
8
packages/desk-os-plymouth/src/desk-os.plymouth
Normal file
8
packages/desk-os-plymouth/src/desk-os.plymouth
Normal file
@@ -0,0 +1,8 @@
|
||||
[Plymouth Theme]
|
||||
Name=deskOS
|
||||
Description=A theme that displays the deskOS logo
|
||||
ModuleName=script
|
||||
|
||||
[script]
|
||||
ImageDir=/usr/share/plymouth/themes/desk-os
|
||||
ScriptFile=/usr/share/plymouth/themes/desk-os/desk-os.script
|
||||
BIN
packages/desk-os-plymouth/src/desk-os.png
Normal file
BIN
packages/desk-os-plymouth/src/desk-os.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.7 KiB |
8
packages/desk-os-plymouth/src/desk-os.script
Normal file
8
packages/desk-os-plymouth/src/desk-os.script
Normal file
@@ -0,0 +1,8 @@
|
||||
image = Image("desk-os.png");
|
||||
|
||||
pos_x = Window.GetWidth()/2 - image.GetWidth()/2;
|
||||
pos_y = Window.GetHeight()/2 - image.GetHeight()/2;
|
||||
|
||||
sprite = Sprite(image);
|
||||
sprite.SetX(pos_x);
|
||||
sprite.SetY(pos_y);
|
||||
Reference in New Issue
Block a user