Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 23 Oct 2014, 15:55
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Eye Candy
"Desktop Picture Replacer" in "Quirky Linux 1.40" ! script
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message
postfs1


Joined: 27 Mar 2010
Posts: 831

PostPosted: 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".
 

Arrow

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.

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [1 Post]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Eye Candy
Jump to:  

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


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0718s ][ Queries: 12 (0.0261s) ][ GZIP on ]