mirror of
https://github.com/basecamp/omarchy.git
synced 2025-07-27 12:19:24 +00:00
29 lines
913 B
Bash
Executable File
29 lines
913 B
Bash
Executable File
#!/bin/bash
|
|
USER_HOME=$(find /home/* -maxdepth 0 | head -n1 | head -n1)
|
|
|
|
echo "Running plymouth sync check for user dir: $USER_HOME"
|
|
|
|
SYNC_FLAG="$USER_HOME/.config/omarchy/.plymouth-sync-needed"
|
|
CURRENT_THEME_LINK="$USER_HOME/.config/omarchy/current/theme"
|
|
|
|
if [[ -f "$SYNC_FLAG" && -L "$CURRENT_THEME_LINK" ]]; then
|
|
CURRENT_THEME=$(readlink "$CURRENT_THEME_LINK")
|
|
THEME_NAME=$(basename "$CURRENT_THEME")
|
|
PLYMOUTH_DIR="$CURRENT_THEME/plymouth"
|
|
|
|
if [[ -d "$PLYMOUTH_DIR" ]]; then
|
|
# Copy theme files to Plymouth
|
|
sudo cp -r "$CURRENT_THEME/plymouth/"* /usr/share/plymouth/themes/omarchy/
|
|
|
|
# Update Plymouth theme and rebuild
|
|
sudo plymouth-set-default-theme -R omarchy
|
|
|
|
echo "Plymouth theme was found in $PLYMOUTH_DIR. Theme synced to $THEME_NAME."
|
|
else
|
|
echo "No plymouth directory found in $CURRENT_THEME. Skipping copy and rebuild."
|
|
fi
|
|
|
|
# Remove sync flag
|
|
rm "$SYNC_FLAG"
|
|
fi
|