LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   imagemagic and conky (https://www.linuxquestions.org/questions/linux-newbie-8/imagemagic-and-conky-814435/)

RudraB 06-16-2010 02:01 AM

imagemagic and conky
 
I have used something like:
Code:

/usr/bin/convert  -format png -resize 160x120 "`/bin/ls *.png *.jpg 2>/dev/null | /usr/bin/shuf -n1`" /dev/shm/current.png}${image /dev/shm/current.png -p 50,225 -n -s 120x120}
to get picture slideshow in conky.

Also, I can manage to get rounded corner of a picture as

Code:

convert 4.jpg -fill none -draw "matte 0,0 reset" -tile 4.jpg -draw "roundRectangle -1,-1 800,500 30,30" +swap -background none -layers merge  +repage n4.png
but while I am trying to get rounded corner in conky, its not working.
what I tried is:
Code:

usr/bin/convert  -format png -resize 160x120 -fill none -draw "matte 0,0 reset" -tile 4.jpg -draw "roundRectangle -1,-1 800,500 30,30" +swap -background none -layers merge  +repage "`/bin/ls *.png *.jpg 2>/dev/null | /usr/bin/shuf -n1`" /dev/shm/current.png}${image /dev/shm/current.png -p 50,225 -n -s 120x120}
If i did that, no slideshow is on.

timmeke 06-17-2010 10:51 AM

I appreciate the effort to go for a one-liner, but this is getting complicated at best.

Try
Code:

f=`/bin/ls *.png *.jpg 2>/dev/null | /usr/bin/shuf -n1`;
and then using ${f} to shorten the command and make it more readable.

maybe I'm missing something, but where is the opening curly brace that matches the closing one at
/dev/shm/current.png} ?

I'm not used to conky, but why don't you simply use imagemagick convert command to go to a movie or animation format,
like multi-image GIF, MPEG,...?

RudraB 06-18-2010 12:51 AM

Quote:

{/usr/bin/convert -format png -resize 160x120 -fill none -draw "matte 0,0 reset" -tile -draw "roundRectangle -1,-1 800,500 30,30" +swap -background none -layers merge +repage ${f} /dev/shm/current.png}${image /dev/shm/current.png -p 50,225 -n -s 120x120}
should be the command with $f taken into consideration. also braces are from the beginning...a copy-paste error.
and can you plz. tell me what is this
"ls *.png *.jpg 2>/dev/null" thing do? redirecting stderr to /dev/null?

timmeke 06-18-2010 01:26 AM

Yes, that's right, it'll send the stderr from ls to /dev/null (which simply means that the error messages are discarded).

Should -tile not have a specification on number of rows/cols? Or do you use the default (or does the option have a different as for montage)?


All times are GMT -5. The time now is 03:50 AM.