Permalink
Browse files

tweaks in photoscripts

  • Loading branch information...
1 parent f4fd79c commit 618069a230c6ce03ae79f25139049f18038f3e12 @helmuthdu committed Jan 17, 2013
View
@@ -3,12 +3,14 @@
# Photo in conky
# by helmuthdu
+# path to image
+filename="/usr/share/backgrounds/159.jpg"
+
photo="/tmp/conkyPhoto.png"
template="/usr/share/conkycolors/icons"
-filename="/usr/share/backgrounds/159.jpg"
-#choose your theme: 1,2 or 3
-theme=3
+#choose your theme: 1,2
+theme=1
dim="medium"
# Manage dimension flag
@@ -26,35 +28,20 @@ fi
rm ${photo}
cp ${filename} ${photo}
-if [[ -f ${photo} ]]; then
- convert ${filename} -resize ${geometry}\> \
- -size ${geometry} xc:black +swap \
- -gravity center -composite ${photo}
+convert ${filename} -resize ${geometry}\> \
+ -size ${geometry} xc:black +swap \
+ -gravity center -composite ${photo}
- if [[ $theme -eq 1 ]]; then
- # Theme 1
- convert -page +2+2 ${photo} \
- -bordercolor snow -border 4.5 \
- -bordercolor gray55 -border 1 \
- -background black \( +clone -shadow 40x2+1+1 \) +swap \
- -background none -flatten \
- ${photo}
- elif [[ $theme -eq 2 ]]; then
- # Theme 2
- convert -page +4+4 ${photo} \
- -bordercolor gray10 -border 1 \
- -background black \( +clone -shadow 40x4+2+2 \) +swap \
- -background none -flatten \
- ${photo}
- elif [[ $theme -eq 3 ]]; then
- # Theme 3
- convert ${template}/photobg_bg_${dim}.png ${photo} \
- -geometry +11+11 -composite ${photo}
- convert ${photo} ${template}/photobg_shadow_${dim}.png \
- -composite ${photo}
- fi
-else
- cp ${imagenotfound} ${photo}
+if [[ $theme -eq 1 ]]; then
+ # Theme 1
+ convert ${template}/photobg_bg_${dim}.png ${photo} \
+ -geometry +11+11 -composite ${photo}
+ convert ${photo} ${template}/photobg_shadow_${dim}.png \
+ -composite ${photo}
+elif [[ $theme -eq 2 ]]; then
+ # Theme 2
+ convert -page +4+4 ${photo} \
+ -bordercolor gray10 -border 1 \
+ -background black \( +clone -shadow 40x4+2+2 \) +swap \
+ -background none -flatten ${photo}
fi
-
-exit
@@ -8,8 +8,8 @@ photo="/tmp/conkyPhoto.png"
template="/usr/share/conkycolors/icons/ConkyPhoto"
filename=`find $source \( -iname "*.png" -o -iname "*.jpg" \) | shuf -n1`
-#choose your theme: 1,2 or 3
-theme=3
+#choose your theme: 1,2
+theme=1
dim="medium"
# Manage dimension flag
@@ -31,31 +31,16 @@ convert ${filename} -resize ${geometry}\> \
-size ${geometry} xc:black +swap \
-gravity center -composite ${photo}
-if [[ -f ${photo} ]]; then
- if [[ $theme -eq 1 ]]; then
- # Theme 1
- convert -page +2+2 ${photo} \
- -bordercolor snow -border 4.5 \
- -bordercolor gray55 -border 1 \
- -background black \( +clone -shadow 40x2+1+1 \) +swap \
- -background none -flatten \
- ${photo}
- elif [[ $theme -eq 2 ]]; then
- # Theme 2
- convert -page +4+4 ${photo} \
- -bordercolor gray10 -border 1 \
- -background black \( +clone -shadow 40x4+2+2 \) +swap \
- -background none -flatten \
- ${photo}
- elif [[ $theme -eq 3 ]]; then
- # Theme 3
- convert ${template}/photobg_bg_${dim}.png ${photo} \
- -geometry +11+11 -composite ${photo}
- convert ${photo} ${template}/photobg_shadow_${dim}.png \
- -composite ${photo}
- fi
-else
- cp ${imagenotfound} ${photo}
+if [[ $theme -eq 1 ]]; then
+ # Theme 1
+ convert ${template}/photobg_bg_${dim}.png ${photo} \
+ -geometry +11+11 -composite ${photo}
+ convert ${photo} ${template}/photobg_shadow_${dim}.png \
+ -composite ${photo}
+elif [[ $theme -eq 2 ]]; then
+ # Theme 2
+ convert -page +4+4 ${photo} \
+ -bordercolor gray10 -border 1 \
+ -background black \( +clone -shadow 40x4+2+2 \) +swap \
+ -background none -flatten ${photo}
fi
-
-exit
Deleted file not rendered

0 comments on commit 618069a

Please sign in to comment.