Posted: Sat 19 Nov 2011, 18:01 Post subject:
"Desktop Picture Replacer" in "Quirky Linux 1.40" ! script Subject description: When there is no another "Picture Replacer".
Quote:
Install_DBPR--sr0.sh
Code:
#!/bin/bash
#DBPR = Desktop Background Picture Replacer
#
echo '[Desktop Entry]' > /usr/share/applications/DesktopPicture.desktop ;
echo 'Name=Desktop Background Picture Replacer' >> /usr/share/applications/DesktopPicture.desktop ;
echo 'Comment=The way to change desktop background' >> /usr/share/applications/DesktopPicture.desktop ;
#Don't touch >>>
#Exec=bash -c "mkdir -p /root/.config/cwallpaper ; echo \"\`Xdialog --stdout --fselect /usr/share/backgrounds/ 40 70\`\" >/tmp/.wpapers ; viewnior \`cat /tmp/.wpapers\` & Xdialog --auto-placement --left --title \"To change or not to change\" --stdout --radiolist \"Choice in regard to replacement of desktop background picture:\" 13 100 10 \"\`cat "'\"/tmp/.wpapers\"'"\`\" \"-=NEW=- picture\" off \"\`cat "'\"/root/.config/cwallpaper/wallpapers\"'"\`\" \"-=OLD=- picture\" on >/root/.config/cwallpaper/.wallpapers ; cd /usr/share/backgrounds/ ; curl -C - -O file://\"\`cat /root/.config/cwallpaper/.wallpapers\`\" ; stat -c %n \"\`cat /root/.config/cwallpaper/.wallpapers\`\" ; cut -f \`cat /root/.config/cwallpaper/.wallpapers | grep -o / | grep -c /\`- -d \"/\" /root/.config/cwallpaper/.wallpapers | cut -f 2 -d \"/\" | cat >/root/.config/cwallpaper/..wallpapers ; sleep 0.5s ; echo \"/usr/share/backgrounds/\`cat /root/.config/cwallpaper/..wallpapers\`\" | cat > /root/.config/cwallpaper/wallpapers ; rm /tmp/.wpapers ; rm /root/.config/cwallpaper/.wallpapers ; rm /root/.config/cwallpaper/..wallpapers ; sed -i\".tmp\" '/\/backgrounds/d' /root/Choices/ROX-Filer/PuppyPin ; sed -i\".tmp\" '/\/pinboard/d' /root/Choices/ROX-Filer/PuppyPin ; mkdir -p /root/.config/wallpaper ; Xdialog --title \"Modes\" --stdout --no-tags --radiolist \"Modes of displaying a picture on the screen\" 13 70 10 \"\`echo "'\"Centre\"'"\`\" \"Centre\" off \"\`echo "'\"Tile\"'"\`\" \"Tile\" off \"\`echo "'\"Stretch\"'"\`\" \"Stretch\" on >/root/.config/wallpaper/backgroundmode ; sleep 0.5s ; if [ ! -x \`grep -o 'Stretch' /root/.config/wallpaper/backgroundmode\` ] ; then echo \" <backdrop style="'\"Stretched\"'">\`cat /root/.config/cwallpaper/wallpapers\`</backdrop>\" >> /root/Choices/ROX-Filer/PuppyPin ; elif [ ! -x \`grep -o 'Tile' /root/.config/wallpaper/backgroundmode\` ] ; then echo \" <backdrop style="'\"Tiled\"'">\`cat /root/.config/cwallpaper/wallpapers\`</backdrop>\" >> /root/Choices/ROX-Filer/PuppyPin ; elif [ ! -x \`grep -o 'Centre' /root/.config/wallpaper/backgroundmode\` ] ; then echo \" <backdrop style="'\"Centred\"'">\`cat /root/.config/cwallpaper/wallpapers\`</backdrop>\" >> /root/Choices/ROX-Filer/PuppyPin ; else sleep 0.5s ; fi ; echo '</pinboard>' >> /root/Choices/ROX-Filer/PuppyPin ; sleep 0.5s ; rox -p=/root/Choices/ROX-Filer/PuppyPin ; fixmenus"
grep '\-\-auto-placement' /mnt/sr0/Desktop_Picture_Replacer/Install_DBPR--sr0.sh | grep -v "Install_DBPR--sr0.sh" | sed 's/#//' | cat >> /usr/share/applications/DesktopPicture.desktop ;
#
echo 'Icon=/usr/local/lib/X11/themes/Smooth-Color/spread48.png' >> /usr/share/applications/DesktopPicture.desktop ;
echo 'Terminal=false' >> /usr/share/applications/DesktopPicture.desktop ;
echo 'Type=Application' >> /usr/share/applications/DesktopPicture.desktop ;
echo 'Encoding=UTF-8' >> /usr/share/applications/DesktopPicture.desktop ;
echo 'Categories=No' >> /usr/share/applications/DesktopPicture.desktop ;
#
# # # A first .desktop file is a reason of functional problem of JWM WM.
#
echo '[Desktop Entry]' > /usr/share/applications/DpPe.desktop ;
echo 'Name=Desktop Background Picture Replacer' >> /usr/share/applications/DpPe.desktop ;
echo 'Comment=The way to change desktop background' >> /usr/share/applications/DpPe.desktop ;
#Not good for TOO LONG line >>>
#echo 'Exec=exec `cat /usr/share/applications/DesktopPicture.desktop | grep 'Exec=' | cut -f2 -d=`' >> /usr/share/applications/DpPe.desktop ;
#
echo 'Exec=rox /usr/share/applications/DesktopPicture.desktop' >> /usr/share/applications/DpPe.desktop ;
echo 'Icon=/usr/local/lib/X11/themes/Smooth-Color/spread48.png' >> /usr/share/applications/DpPe.desktop ;
echo 'Terminal=false' >> /usr/share/applications/DpPe.desktop ;
echo 'Type=Application' >> /usr/share/applications/DpPe.desktop ;
echo 'Encoding=UTF-8' >> /usr/share/applications/DpPe.desktop ;
echo 'Categories=DesktopSettings;' >> /usr/share/applications/DpPe.desktop ;
#
rox -p=/root/Choices/ROX-Filer/PuppyPin ;
fixmenus ;
xmessage "-=Desktop Background Picture Replacer=- has been installed." `jwm -restart`
Edit: 2011, nov 19.
A script's content can be copied into text editor by means of <Quote> mode. _________________
I don't know why laboratories are named a hospitals.
The alive personage is like a tea bag with granules of unknown density inside, at that one the packet was made of organic material and was placed in the evaporated liquid or liquid.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum