Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 618069a230
Fetching contributors…

Cannot retrieve contributors at this time

executable file 47 lines (40 sloc) 1.168 kb
#!/bin/bash
#
# Photo in conky
# by helmuthdu, paulvictor and Alessandro Roncone
source="/usr/share/backgrounds/"
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
theme=1
dim="medium"
# Manage dimension flag
if [[ $dim == "small" ]]; then
geometry="158x100"
geometry_crop="236x212"
elif [[ $dim == "medium" ]]; then
geometry="238x148"
geometry_crop="316x260"
elif [[ $dim == "big" ]]; then
geometry="318x200"
geometry_crop="396x312"
fi
rm ${photo}
cp ${filename} ${photo}
convert ${filename} -resize ${geometry}\> \
-size ${geometry} xc:black +swap \
-gravity center -composite ${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
Jump to Line
Something went wrong with that request. Please try again.