I've got a small script I use to generate HTML pages for my personal website. One of the things the script does is start xscreensaver to view a photo, so that I can type a description into it.
It works great, except that I have to take my hands off of the keyboard, and click with the mouse after opening xscreensaver in order to get the focus back to my terminal window.
Anyone know how to open xscreensaver in the background, so that the focus stays on the terminal window where I'll be typing?
(I guess I could do all this in PerlTK, but the bash script was very quick & works just fine.)
Cheers,
James
Bonus points if you can ID my old WYSIWYG HTML editor from the script contents...
------------------------------------------
#!/bin/bash
##########################################################
# pagegen.sh
# HTML slideshow page generator with zuelow.net colorscheme
# Depends on images already scanned & resized, with images
# in jpeg format ,named to sort into a series and alone in the
# Resources dir.
#
# Move HTML & jpegs manually to site directory after creation & testing..
#
# James Zuelow // Juneau Linux Users Group
# $Log: pagegen.sh,v $
# Revision 1.3 2004/07/29 05:04:55 james
# Corrected human numbering (1,2,3 not 101,102,103...)
#
# Revision 1.2 2004/07/29 04:57:11 james
# Changed numbering scheme to 101+ to match rescalejpg.sh scheme.
#
##########################################################
i=100
echo -n "Enter series (filename) title: "
read PGtitle
echo -n "Enter descriptive (human) title: "
read PGhtitle
echo "Select the pageup target:"
select pageup in phoenpg.html calvinpg.html photopg.html
do
PGup=$pageup
break
done
h=`find ./Resources -name "*.jpg" | wc -l`
for PGimage in `find ./ -name "*.jpg" | cut -c 3-`
do
(( i = i + 1 ))
(( j = i - 1 ))
(( k = i + 1 ))
(( l = i - 100 ))
if [ $i -gt 101 ]
then
PvPG="<A HREF=\"${PGtitle}${j}.html\">Previous Photo</A> "
else
PvPG=""
fi
if [ $i -lt $h ]
then
NxPG=" <A HREF=\"${PGtitle}${k}.html\">Next Photo</A>"
RePG="<META HTTP-EQUIV=\"refresh\" CONTENT=\"30; url=${PGtitle}${k}.html\">"
else
NxPG=""
RePG=""
fi
echo "<HTML>" > ${PGtitle}${i}.html
echo "<HEAD>" >> ${PGtitle}${i}.html
echo "<META NAME=\"GENERATOR\" CONTENT=\"Bash 2.05b scripting by James Zuelow, Juneau Linux Users Group\">" >> ${PGtitle}${i}.html
echo "<TITLE>${PGhtitle} No.${l}</TITLE>" >> ${PGtitle}${i}.html
echo $RePG >> ${PGtitle}${i}.html
echo "</HEAD>" >> ${PGtitle}${i}.html
echo "<BODY TEXT=\"#ffffcc\" BGCOLOR=\"#000000\" LINK=\"#ffcc66\" ALINK=\"#ff9900\" VLINK=\"#cc9933\">" >> ${PGtitle}${i}.html
echo "<P><CENTER>${PvPG}<A HREF=\"${PGup}\">Photo Page</A>${NxPG}</CENTER></P>" >> ${PGtitle}${i}.html
echo "<P><CENTER><IMG SRC=\"${PGimage}\" ALT=\"${PGhtitle} No.${l}\" ALIGN=\"BOTTOM\" BORDER=\"0\" NATURALSIZEFLAG=\"3\"></CENTER></P>" >> ${PGtitle}${i}.html
xslideshow ${PGimage} &
echo -n "Enter image description: "
read PGimageDESC
killall xslideshow
echo "<P><CENTER><FONT COLOR=\"#ffffe1\">${PGimageDESC}</FONT></CENTER>" >> ${PGtitle}${i}.html
echo "</BODY>" >> ${PGtitle}${i}.html
echo "</HTML>" >> ${PGtitle}${i}.html
done
exit
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Tue Aug 3 18:04:56 2004
This archive was generated by hypermail 2.1.8 : Tue Aug 03 2004 - 18:04:56 AKDT