Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Warn users before asking for consent
- echo """
- ***** WARNING *****
- This script is just a fun thing I wrote
- after changing my own plymouth theme.
- Read through it first to make sure you
- understand what it will be doing. It
- requires root privileges via sudo. It
- comes with ABSOLUTELY ZERO SUPPORT from
- me. I have only tested it with PNG images
- with transparency and dimensions of roughly
- 250x250px.Feel free to modify it to suit
- your needs.
- ***** END WARNING ***
- """
- # Ask user to proceed
- read -p "I've read and understand the warning [Y/N]: " WARNING
- # If user consented, time to do work
- if [ $WARNING == "Y" ] || [ $WARNING == "y" ]; then
- # Define path to default plymouth theme
- ORIGPATH=/usr/share/plymouth/themes/mint-logo
- # Backup default theme
- sudo cp -a $ORIGPATH $ORIGPATH-orig
- echo "Saved original theme to $ORIGPATH-orig."
- # Ask for path to custom image
- echo
- read -p "Enter the full path to the desired splash image: " CUSTPATH
- # Remove original animation*.png and throbber*.png files
- sudo rm $ORIGPATH/{animation,throbber}*.png
- # Copy custom image to the theme
- sudo cp $CUSTPATH $ORIGPATH/animation-0001.png
- sudo cp $CUSTPATH $ORIGPATH/throbber-0001.png
- # Update initramfs to implement the image change
- echo
- echo "Updating initramfs. This is going to take some time..."
- sudo update-initramfs -u
- # Inform user to reboot the system to see the change
- echo
- echo "Reboot your system to see the change. Enjoy!"
- # Inform user of how to revert the change
- echo
- echo "Use 'sudo cp -a $ORIGPATH-orig $ORIGPATH && sudo update-initramfs -u' to revert"
- echo
- else
- # Without user consent, exit
- echo
- echo "Exiting."
- echo
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement