diff --git a/scripts.tar.xz b/scripts.tar.xz index 9947873..7649fa9 100644 Binary files a/scripts.tar.xz and b/scripts.tar.xz differ diff --git a/scripts/set-plymouth b/scripts/set-plymouth index 8f1b6aa..09d7674 100755 --- a/scripts/set-plymouth +++ b/scripts/set-plymouth @@ -4,6 +4,7 @@ MoePlymouthURL="https://github.com/mifjpn/Moebuntu-kawaiiUbuntu-ToysOriginal/raw MoePlymouthFileName=`echo $MoePlymouthURL|awk -F"/" '{print $NF}'` MoePlymouthDirName="mmspinner" MoePlymouthBackGroundFile="/usr/share/plymouth/themes/mmspinner/background-tile.png" +MoePlymouthBackGroungFileName=`echo $MoePlymouthBackGroundFile|awk -F"/" '{print $NF}'` PlymothThemePath="/usr/share/plymouth/themes" MoeAlternativesPath="/usr/share/plymouth/themes/mmspinner/mmspinner.plymouth" DetaultAlternativesPath="/usr/share/plymouth/themes/bgrt/bgrt.plymouth" @@ -67,6 +68,15 @@ if [ ! $? -eq 0 ]; then echo " already Installed" fi +# Install imagemagick-2212291856 +echo " Install imagemagick" +dpkg -s imagemagick >/dev/null 2>&1 +if [ ! $? -eq 0 ]; then + sudo apt install -y imagemagick + else + echo " Already Installed" +fi + # Download Plymouth echo " download $MoePlymouthFileName " curl -L $MoePlymouthURL --output "$TempDir/$MoePlymouthFileName" @@ -90,8 +100,9 @@ echo " exist Moe Plymouth: `ls -d "$PlymothThemePath/$MoePlymouthDirName"`" sudo update-alternatives --set default.plymouth "$MoeAlternativesPath" >/dev/null 2>/dev/null # Change login screen -echo " Set Moebuntu basic plymouse screen image (Y)" -echo -n "Or Set Original(or Example) plymouth png-file(N)?:" +echo " Set Moebuntu basic plymouth screen image (Y)" +# fix word for update 2212291928 +echo -n "Or Set Original(or Example) plymouth screen image(N)?:" if askyn; then # Moebuntu basic Change screen then not copy # Remove tempdir @@ -107,7 +118,7 @@ if askyn; then exit 0 fi # Choose Change Screen -read -p "Please drag-and-drop plymouth png-file or push to set return(Example):" FileDrop +read -p "Please drag-and-drop plymouth (png etc.)image file or push only return to set Example image:" FileDrop if [ "$FileDrop" = "" ]; then # Null return # Set to default @@ -152,8 +163,32 @@ if [ "$FileDrop" = "" ]; then echo ""   exit 0 fi - echo " set Plymouth tile picture to $PlymouthFile" - sudo cp $PlymouthFile $MoePlymouthBackGroundFile + # file conversion-2212291856 + FileName=`echo $PlymouthFile|awk -F"/" '{print $NF}'` + FileExtension=`echo ${FileName##*.}` + echo "FileExtension is $FileExtension" + if [ $FileExtension = "png" ] || [ $FileExtension = "PNG" ]; then + echo " set Plymouth tile picture to $PlymouthFile" + sudo cp $PlymouthFile $MoePlymouthBackGroundFile + echo "" + else + echo " Convert $PlymouthFile to $TempDir/$MoePlymouthBackGroungFileName" + ReturnValue=`convert $PlymouthFile $TempDir/$MoePlymouthBackGroungFileName` + if [ "$ReturnValue" != "" ]; then + echo "Can't convert to PNG-image" + echo "Can not change Plymouth picture" + # remove temp-dir + rm -rf $TempDir + echo "" + echo -n "Hit Any Key:" + read -r -n 1 -s answer + echo ""   + exit 0 + fi + sudo cp $TempDir/$MoePlymouthBackGroungFileName $MoePlymouthBackGroundFile + echo "Done" + echo "" + fi fi # remove temp-dir rm -rf $TempDir diff --git a/scripts/set-theme b/scripts/set-theme index f4b5b19..301a3a4 100755 --- a/scripts/set-theme +++ b/scripts/set-theme @@ -61,6 +61,15 @@ if [ ! $? -eq 0 ]; then echo " Already Installed" fi +# Install imagemagick-2212291856 +echo " Install imagemagick" +dpkg -s imagemagick >/dev/null 2>&1 +if [ ! $? -eq 0 ]; then + sudo apt install -y imagemagick + else + echo " Already Installed" +fi + # Download Theme echo " download $ThemeFileName" curl -L $ThemeUrl --output "$TempDir/$ThemeFileName" @@ -102,9 +111,10 @@ if askyn; then # login png-file echo "Set Moebuntu basic login picture(Y)" - echo -n " Or Original(or Example) login png-picture(N)?:" + # sentence modified at 2212291859 + echo -n " Or Original(or Example) login image(N)?:" if ! askyn; then - read -p "Please drag-and-drop login png-file or push to set return(Example):" FileDrop + read -p "Please drag-and-drop login png(or other)image-file or push to only return to set Example image:" FileDrop if [ "$FileDrop" = "" ]; then # set default login picture # download default login picture @@ -144,9 +154,33 @@ if askyn; then echo ""   exit 0 fi - sudo cp $LoginFile /usr/share/themes/$ThemeDirName/gnome-shell/moebuntu_bg.png - echo "Done" - echo "" + # file conversion-2212291856 + FileName=`echo $LoginFile|awk -F"/" '{print $NF}'` + FileExtension=`echo ${FileName##*.}` + echo "FileExtension is $FileExtension" + if [ $FileExtension = "png" ] || [ $FileExtension = "PNG" ]; then + sudo cp $LoginFile /usr/share/themes/$ThemeDirName/gnome-shell/moebuntu_bg.png + echo "Done" + echo "" + else + echo " Convert $LoginFile to $TempDir/moebuntu_bg.png" + ReturnValue=`convert $LoginFile $TempDir/moebuntu_bg.png` + # echo " ReturnValue is $ReturnValue" + if [ "$ReturnValue" != "" ]; then + echo "Can't convert to PNG-image" + echo "Can not change login picture" + # remove temp-dir + rm -rf $TempDir + echo "" + echo -n "Hit Any Key:" + read -r -n 1 -s answer + echo ""   + exit 0 + fi + sudo cp $TempDir/moebuntu_bg.png /usr/share/themes/$ThemeDirName/gnome-shell/moebuntu_bg.png + echo "Done" + echo "" + fi fi else echo "=set login to Moe-ized=" diff --git a/scripts/wallmanager b/scripts/wallmanager index dd06562..eccedc0 100755 --- a/scripts/wallmanager +++ b/scripts/wallmanager @@ -22,6 +22,18 @@ InstallCurl() { fi echo "" } + +# Install imagemagick-2212291856 +InstallImagemagick() { +echo " Install imagemagick" +dpkg -s imagemagick >/dev/null 2>&1 +if [ ! $? -eq 0 ]; then + sudo apt install -y imagemagick + else + echo " Already Installed" +fi +} + #Ask Yn askyn() { echo -n "(Y/N)? " @@ -48,8 +60,9 @@ if [ "$1" = "install" ]; then # install echo "=Install Desktop Wallpaper=" InstallCurl; + InstallImagemagick; # Ask filename of wallpaper - read -p "Please drag-and-drop wall jpg or png image file or push to set return(Example):" FileDrop + read -p "Please drag-and-drop wall (png etc) image file or push only return to set example image:" FileDrop if [ "$FileDrop" = "" ]; then # set default login picture # download default login picture @@ -107,15 +120,36 @@ if [ "$1" = "install" ]; then ConstMoeWallFileName=$ConstWallFileNamePng else echo "extention is not jpg or png." - echo "please drag and drop jpg or png image file." - echo "can not change desktop wallpaper" - # remove temp-dir + echo " convert to png file" + # convert to png + ConstMoeWallFileName=$ConstWallFileNamePng + echo "FileExtension is $FileExtension" + echo " Convert $WallFileFullPath to $TempDir/$ConstMoeWallFileName" + ReturnValue=`convert $WallFileFullPath $TempDir/$ConstMoeWallFileName` + if [ "$ReturnValue" != "" ]; then + echo "Can't convert to PNG-image" + echo "Can not change wallpaper picture" + # remove temp-dir + rm -rf $TempDir + echo "" + echo -n "Hit Any Key:" + read -r -n 1 -s answer + echo ""   + exit 0 + fi + sudo cp "$TempDir/$ConstMoeWallFileName" "$SYSWallDir/$ConstMoeWallFileName" + echo "Done" + echo " setting $TempDir/$ConstMoeWallFileName to $SYSWallDir/$ConstMoeWallFileName" + gsettings set org.gnome.desktop.background picture-uri "file://$SYSWallDir/$ConstMoeWallFileName" + gsettings set org.gnome.desktop.background picture-uri-dark "file://$SYSWallDir/$ConstMoeWallFileName" + echo "Done" + echo " remove temp folder $TempDir" rm -rf $TempDir echo "" echo -n "Hit Any Key:" read -r -n 1 -s answer - echo ""   - exit 0 + echo "" + exit 0 fi echo " copy $WallFileFullPath to $SYSWallDir" sudo cp "$WallFileFullPath" "$SYSWallDir/$ConstMoeWallFileName" @@ -124,14 +158,21 @@ if [ "$1" = "install" ]; then gsettings set org.gnome.desktop.background picture-uri-dark "file://$SYSWallDir/$ConstMoeWallFileName" echo "Done" echo " remove temp folder $TempDir" + # remove temp-dir rm -rf $TempDir echo "" echo -n "Hit Any Key:" read -r -n 1 -s answer - echo "" + echo ""   exit 0 fi - # remove + rm -rf $TempDir + echo "" + echo -n "Hit Any Key:" + read -r -n 1 -s answer + echo "" + exit 0 +# remove elif [ "$1" = "remove" ]; then echo "=Remove Moe desktop wallpaper ${MoeWallFileName%.*} and set detault=" echo " seting to $DefaultWallFileName"