LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-16-2010, 02:01 AM   #1
RudraB
Member
 
Registered: Mar 2007
Distribution: Fedora
Posts: 263

Rep: Reputation: 23
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.
 
Old 06-17-2010, 10:51 AM   #2
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
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,...?

Last edited by timmeke; 06-17-2010 at 10:53 AM.
 
Old 06-18-2010, 12:51 AM   #3
RudraB
Member
 
Registered: Mar 2007
Distribution: Fedora
Posts: 263

Original Poster
Rep: Reputation: 23
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?

Last edited by RudraB; 06-18-2010 at 01:03 AM.
 
Old 06-18-2010, 01:26 AM   #4
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
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)?

Last edited by timmeke; 06-18-2010 at 01:28 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
conky question: passing conky-variable to shell-script zlin50 Linux - Software 2 12-29-2012 06:47 PM
Imagemagic path razzera Debian 1 03-31-2010 01:08 AM
Conky on Suse 10.0 - *** buffer overflow detected *** conky terminated Slidex Linux - Software 1 03-17-2006 11:50 AM
Install ImageMagic notooth Linux - Software 12 04-24-2005 04:10 PM
ImageMagic mickeyboa Fedora 3 10-07-2004 07:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration