1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-18 13:31:36 +03:00
mobile-nixos/boot/init/tasks/splash.rb

25 lines
398 B
Ruby
Raw Normal View History

2019-12-23 06:32:34 +03:00
# Adds a minimal set of files required for logging-in.
class Tasks::Splash < Task
attr_reader :image
def initialize(image)
add_dependency(:Target, :Graphics)
2019-12-23 06:32:34 +03:00
@image = image
end
def run()
begin
2019-12-23 06:32:34 +03:00
System.run("ply-image", "/splash.#{image}.png")
rescue System::CommandError
end
2019-12-23 06:32:34 +03:00
end
def name()
"#{super}(#{image})"
end
def ux_priority()
-100
end
2019-12-23 06:32:34 +03:00
end