commit e763e12419b8d1866312b1fc7086f00cd42fa6a3 Author: Franklyn Tackitt Date: Mon Aug 1 10:02:25 2022 -0700 Initial commit diff --git a/deck_startup/deck_startup.dreamcast.webm b/deck_startup/deck_startup.dreamcast.webm new file mode 100755 index 0000000..6d44de3 Binary files /dev/null and b/deck_startup/deck_startup.dreamcast.webm differ diff --git a/deck_startup/deck_startup.gamecube.webm b/deck_startup/deck_startup.gamecube.webm new file mode 100755 index 0000000..c7bc9ed Binary files /dev/null and b/deck_startup/deck_startup.gamecube.webm differ diff --git a/deck_startup/deck_startup.ps1.webm b/deck_startup/deck_startup.ps1.webm new file mode 100755 index 0000000..662c9b4 Binary files /dev/null and b/deck_startup/deck_startup.ps1.webm differ diff --git a/deck_startup/deck_startup.ps2.webm b/deck_startup/deck_startup.ps2.webm new file mode 100755 index 0000000..e17bb1c Binary files /dev/null and b/deck_startup/deck_startup.ps2.webm differ diff --git a/deck_startup/deck_startup.ps4.webm b/deck_startup/deck_startup.ps4.webm new file mode 100755 index 0000000..b058e93 Binary files /dev/null and b/deck_startup/deck_startup.ps4.webm differ diff --git a/deck_startup/deck_startup.switch.webm b/deck_startup/deck_startup.switch.webm new file mode 100755 index 0000000..980c322 Binary files /dev/null and b/deck_startup/deck_startup.switch.webm differ diff --git a/deck_startup/deck_startup.switchfirst.webm b/deck_startup/deck_startup.switchfirst.webm new file mode 100755 index 0000000..c5efb03 Binary files /dev/null and b/deck_startup/deck_startup.switchfirst.webm differ diff --git a/deck_startup/deck_startup.x360.webm b/deck_startup/deck_startup.x360.webm new file mode 100755 index 0000000..5067a19 Binary files /dev/null and b/deck_startup/deck_startup.x360.webm differ diff --git a/deck_startup/deck_startup.xbone.webm b/deck_startup/deck_startup.xbone.webm new file mode 100755 index 0000000..6ed1a67 Binary files /dev/null and b/deck_startup/deck_startup.xbone.webm differ diff --git a/deck_startup/deck_startup.xbox.webm b/deck_startup/deck_startup.xbox.webm new file mode 100755 index 0000000..95e44e0 Binary files /dev/null and b/deck_startup/deck_startup.xbox.webm differ diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..43dedaf --- /dev/null +++ b/install.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Create required directories +mkdir -p "$HOME/homebrew" +mkdir -p "$HOME/.config/systemd/user" + +# Clone the startup animations repository +if [[ ! -d "$HOME/homebrew/startup_animations" ]]; then + git clone https://github.com/kageurufu/steamdeck_startup_animations "$HOME/homebrew/startup_animations" +fi + +# Install the service file +ln -sf "$HOME/homebrew/startup_animations/randomize_deck_startup.service" "$HOME/.config/systemd/user/randomize_deck_startup.service" +systemctl --user daemon-reload +systemctl --user enable --now randomize_deck_startup.service + diff --git a/randomize_deck_startup.service b/randomize_deck_startup.service new file mode 100644 index 0000000..4b36082 --- /dev/null +++ b/randomize_deck_startup.service @@ -0,0 +1,11 @@ +[Unit] +Description=Randomize deck_startup.webm after boot + +[Install] +WantedBy=default.target + +[Service] +Type=oneshot +WorkingDirectory=/home/deck/homebrew/startup_animations +# ExecStartPre=/bin/sleep 30 +ExecStart=/home/deck/homebrew/startup_animations/randomize_deck_startup.sh diff --git a/randomize_deck_startup.sh b/randomize_deck_startup.sh new file mode 100755 index 0000000..b736a58 --- /dev/null +++ b/randomize_deck_startup.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +Color_Off='\033[0m' # Text Reset + +# Regular Colors +Black='\033[0;30m' # Black +Red='\033[0;31m' # Red +Green='\033[0;32m' # Green +Yellow='\033[0;33m' # Yellow +Blue='\033[0;34m' # Blue +Purple='\033[0;35m' # Purple +Cyan='\033[0;36m' # Cyan +White='\033[0;37m' # White + +msg() { + echo -e ":: ${@}$Color_Off" +} + +msg2() { + echo -e "$Red!!$Color_Off ${@}$Color_Off" +} + +DECK_STARTUP_FILE="/home/deck/.steam/steam/steamui/movies/deck_startup.webm" +DECK_STARTUP_FILE_SIZE=1840847 +DECK_STARTUP_STOCK_MD5="4ee82f478313cf74010fc22501b40729" + +check_backup() { + if [[ ! -f "$DECK_STARTUP_FILE.backup" ]]; then + checksum="$(md5sum "$DECK_STARTUP_FILE" | cut -d ' ' -f 1)" + if [[ "$checksum" != "$DECK_STARTUP_STOCK_MD5" ]]; then + msg2 "deck_startup.webm has already been modified, cannot make a backup" + else + msg "Creating backup of initial deck_startup.webm ($checksum)" + cp "$DECK_STARTUP_FILE" "$DECK_STARTUP_FILE.backup" + fi + fi +} + +list_animations() { + find . -type f -size "${DECK_STARTUP_FILE_SIZE}c" -iname '*.webm' -print0 +} + +random_animation() { + mapfile -d $'\0' animations < <(list_animations) + echo "${animations[$RANDOM % ${#animations[@]}]}" +} + +check_backup +animation="$(random_animation)" +msg "Using $animation" +ln -f "$animation" "$DECK_STARTUP_FILE" +