Skip to content

Commit

Permalink
Add the ability for a user to provide their own splash screens (#311)
Browse files Browse the repository at this point in the history
* Add the ability for a user to provide their own splash screens

* use SETTINGS_DIR for splash image location

---------

Co-authored-by: Alesh Slovak <[email protected]>
  • Loading branch information
ruineka and alkazar authored Jun 6, 2024
1 parent da07ca7 commit db1d467
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion libexec/chimera-splash
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/usr/bin/env python
import argparse
import pyglet
import os.path
from chimera_app.config import RESOURCE_DIR
from chimera_app.config import SETTINGS_DIR

PIPE_FILE=str()

Expand All @@ -18,7 +20,12 @@ label = pyglet.text.Label("",
batch=batch
)

background_image_path = RESOURCE_DIR + "/images/splash/chimeraos_logo.png"
custom_image_path = os.path.join(SETTINGS_DIR, 'splash.png')
if os.path.exists(custom_image_path):
background_image_path = custom_image_path
else:
background_image_path = os.path.join(RESOURCE_DIR, 'images', 'splash', 'chimeraos_logo.png')

background_image = pyglet.image.load(background_image_path)
background = pyglet.sprite.Sprite(img=background_image, batch=batch)

Expand Down

0 comments on commit db1d467

Please sign in to comment.