You are not logged in.
Pages: 1
Hello,
I had an idea to use a convert script to display backgrouds for your conkys for example.
daniel38100 and jpdipsy are the contributors of the code I only had the idea.
syntaxe calling cartouche BG :
~/bin/draw_bg_convert.sh crea_cart "BG" "715x105" "cadre" "red" "0" "blue" "5"
you can read the little how-to in the script.
draw_bg_convert.sh:
#!/bin/bash
#------------------------------------------------------------------------------------------------------#
#inspiration: jpdipsy help-scripting: daniel38100 idea: ragamatrix from forum ubuntu-fr
#Examples how-to
#syntaxe calling cartouche BG :
#~/bin/draw_bg_convert.sh crea_cart "BG" "715x105" "cadre" "red" "0" "blue" "5"
#crea_cart "BG" "715x102" "cadre" "#00000000" "0" "#00000060" "5" #BG without square
#crea_cart "BG" "715x105" "cadre" "silver" "0" "#00000040" "5" #BG with square
# ^name.png ^size(x-y) ^frame | | | | |
# color frame | |
# | | |
# thickness frame |
# | |
# color background
# |
# corner radius
#------------------------------------------------------------------------------------------------------#
#You can change the reptemp path by your /pathes/choices you want
if [ ! -z $9 ];then
reptemp="$9"
elif [ -z $4 ];then
reptemp=/tmp
elif [ $4 != "cadre" ];then
reptemp=$4
else
reptemp=/tmp
fi
echo $reptemp > ~/test.log
case "$1" in
crea_cart )
nom="$reptemp/$2.png" ;export image_"$2"="$nom" ;taille="$3";cadre="$4";couleur="$5";bordure="$6";couleurfond="$7";arrondi="$8"
if [[ $4 = "cadre" ]];then
# rectangle 1px de moins sur la taille
L=$(echo $taille|cut -d x -f1);L=$((L - 1))
H=$(echo $taille|cut -d x -f2);H=$((H - 1))
convert -size "$taille" xc:none -fill "$couleurfond" -strokewidth "$bordure" -stroke "$couleur" -draw "roundrectangle 1,1 $L,$H $arrondi,$arrondi" "$nom"
else
convert -size "$taille" xc:none "$nom"
fi
;;
esac
exit
render-examples:
I hope you'll like it enjoy to use it without limit
Last edited by ragamatrix (2017-03-08 11:17:28)
Offline
^Somehow those picture links do not work for me - is it me, or are they only temporarily unavailable?
Offline
Pages: 1