#!/bin/bash

for i in `ps aux | grep [c]onkyrc_calendrier |awk '{ print $2}'`; do kill -9 $i;done;

if [[ -n $i ]]
	then
		exit 0
	else	
		no=$(~/conky/calendrier/calendar.sh | wc -l)
		echo "avm="\"$no\" > ~/conky/calendrier/nligne

		if [ $no -eq 9 ]; then
			conky -c ~/.conkyrc_calendrier &
			sleep 1
			conky -c ~/.conkyrc_calendrier_text &
		else
			conky -c ~/.conkyrc_calendrier2 &
			sleep 1
			conky -c ~/.conkyrc_calendrier_text2 &
		fi
fi

exit 0
