mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2025-03-06 14:27:48 +00:00
Add basic Easter Egg splashscreen function
This commit is contained in:
parent
e11dd263f2
commit
2aa492f5de
19
functions.sh
19
functions.sh
|
@ -838,8 +838,27 @@ create_lock() {
|
|||
conf_write
|
||||
}
|
||||
|
||||
easter_eggs() {
|
||||
today=$(date +"%0m%0d") # Read the current date in a format that can be calculated in ranges
|
||||
|
||||
# Set Easter Egg date or ranges here, in mmdd format
|
||||
|
||||
if [[ today -eq "0401" ]]; then # An example of a one-day easter egg
|
||||
echo "Today is April Fools Day!"
|
||||
# cp -fv /app/share/emulationstation/resources/graphics/splash-aprilfools.svg /app/share/emulationstation/resources/graphics/splash.svg
|
||||
elif [[ today -ge "1001" && today -le "1031" ]]; then # An example of a multi-day easter egg
|
||||
echo "Today is in the spooky month!"
|
||||
# cp -fv /app/share/emulationstation/resources/graphics/splash-spookytime.svg /app/share/emulationstation/resources/graphics/splash.svg
|
||||
else # Revert to standard splash otherwise
|
||||
echo "Nothing special happening today"
|
||||
# cp -fv /app/share/emulationstation/resources/graphics/splash-orig.svg /app/share/emulationstation/resources/graphics/splash.svg
|
||||
fi
|
||||
}
|
||||
|
||||
start_retrodeck() {
|
||||
# normal startup
|
||||
echo "Checking to see if today has a surprise"
|
||||
easter_eggs
|
||||
echo "Starting RetroDECK v$version"
|
||||
emulationstation --home /var/config/emulationstation
|
||||
}
|
||||
|
|
|
@ -966,9 +966,13 @@ modules:
|
|||
# These must be put in home folder, managed by retrodeck.sh
|
||||
- cp es-configs/es_settings.xml ${FLATPAK_DEST}/retrodeck/es_settings.xml
|
||||
|
||||
# Logo, res
|
||||
# Logo, res, move graphics directory to mutable space so splash can be changed after build
|
||||
- rm -f /app/share/emulationstation/resources/graphics/splash.svg
|
||||
- mv -f -t /var/config/emulationstation /app/share/emulationstation/resources/graphics
|
||||
- ln -s /var/config/emulationstation/graphics /app/share/emulationstation/resources/graphics
|
||||
- cp -f res/extra-splashes/* /app/share/emulationstation/resources/graphics/
|
||||
- cp -f res/splash.svg /app/share/emulationstation/resources/graphics/splash.svg
|
||||
- cp -f res/splash.svg /app/share/emulationstation/resources/graphics/splash-orig.svg
|
||||
- cp -f res/icon.svg /app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg
|
||||
|
||||
# Tools
|
||||
|
|
Loading…
Reference in a new issue