mirror of
https://github.com/basecamp/omarchy.git
synced 2025-07-28 12:49:25 +00:00
Remove theme switching
This commit is contained in:
@ -1,28 +0,0 @@
|
|||||||
#!/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
|
|
@ -35,9 +35,6 @@ ln -nsf "$NEW_THEME" "$HOME/.config/omarchy/current/theme"
|
|||||||
# Touch alacritty config to pickup the changed theme
|
# Touch alacritty config to pickup the changed theme
|
||||||
touch "$HOME/.config/alacritty/alacritty.toml"
|
touch "$HOME/.config/alacritty/alacritty.toml"
|
||||||
|
|
||||||
# Touch .plymouth-sync-needed to signal rebuild on shutdown / reboot
|
|
||||||
touch "$HOME/.config/omarchy/.plymouth-sync-needed"
|
|
||||||
|
|
||||||
# Restart for new theme
|
# Restart for new theme
|
||||||
pkill -SIGUSR2 waybar
|
pkill -SIGUSR2 waybar
|
||||||
makoctl reload
|
makoctl reload
|
||||||
|
@ -57,28 +57,3 @@ else
|
|||||||
echo " - quiet (for silent boot)"
|
echo " - quiet (for silent boot)"
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Touch .plymouth-sync-needed to signal rebuild on shutdown / reboot
|
|
||||||
touch "$HOME/.config/omarchy/.plymouth-sync-needed"
|
|
||||||
|
|
||||||
# Create the systemd service
|
|
||||||
sudo tee /etc/systemd/system/omarchy-plymouth-shutdown.service >/dev/null <<EOF
|
|
||||||
[Unit]
|
|
||||||
Description=Sync Plymouth Theme on Shutdown
|
|
||||||
DefaultDependencies=yes
|
|
||||||
After=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
RemainAfterExit=yes
|
|
||||||
ExecStart=/bin/true
|
|
||||||
ExecStop=$HOME/.local/share/omarchy/bin/omarchy-plymouth-shutdown-sync
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# Reload systemd and enable the service
|
|
||||||
sudo systemctl daemon-reload
|
|
||||||
sudo systemctl enable omarchy-plymouth-shutdown.service
|
|
||||||
sudo systemctl start omarchy-plymouth-shutdown.service
|
|
||||||
|
Reference in New Issue
Block a user