to save the screen capture image is the clipart
folder. This is a convenient feature for the user.
Code: Select all
#!/bin/bash
#new version Nov 2011
echo -e "\nlast_dir = /root/my-documents/clipart" > /tmp/add_text
cd /root
sed '/clipart/!s/last_dir = /toolbar99 = /' .mtpaint > .mtpaint_new
cat .mtpaint_new /tmp/add_text > .mtpaint_new2
mv -f .mtpaint_new2 .mtpaint
rm .mtpaint_new
rm /tmp/add_text
export Screenshot="
<window title=\"Screen Capture\">
<frame Please choose>
<pixmap><input file>/usr/share/pixmaps/gtkam.png</input></pixmap>
<vbox>
<button>
<input file icon=\"gtk-refresh\"></input>
<label>Wait 10 sec</label>
<action>(echo 10; sleep 1 ; echo 20; sleep 1 ; echo 30 ; sleep 1 ; echo 40; sleep 1 ; echo 50 ; sleep 1 ; echo 60 ; sleep 1 ; echo 70 ; sleep 1 ; echo 80 ; sleep 1 ; echo 90 ; sleep 1 ; echo 100 ) | Xdialog --title 'Puppy Screenshot' --beep-after --wrap --screen-center --center --no-buttons --gauge ' $LOC300 ' 10 50 100 ; exec mtpaint -s &</action>
<action>exit: Screenshot</action>
</button>
<button>
<input file icon=\"gtk-apply\"></input>
<label> Now</label>
<action>exec mtpaint -s &</action>
<action>exit: Screenshot</action>
</button>
<button>
<input file icon=\"gtk-quit\"></input>
<label>Quit</label>
</button>
</vbox>
</frame>
</window>"
I=$IFS; IFS=""
for STATEMENTS in $(gtkdialog3 --program=Screenshot --center ); do
eval $STATEMENTS
done
IFS=$I
exit