[SOLVED] Question about conky photo setup

Forum rules
Before you post please read this

[SOLVED] Question about conky photo setup

Postby mastery on Sun Nov 14, 2010 9:16 pm

Having a problem getting a random photo into my Conky. I'm trying to use the random photo feature in conky-colors, but can't get anything to appear in the conky.

My conky code:
Code: Select all
${voffset 4}${font Droid Sans:style=Bold:size=8}PHOTO $stippled_hr${font}
${execi 240 ~/.conkycolors/bin/conkyPhotoRandom}${image /home/mastery/conky_photos/conkyPhoto.png -s 175x120 -p 4,10}


My conkyphotorandom code:
Code: Select all
#!/bin/bash
#
# Photo in conky
# by helmuthdu and paulvictor
source="/home/mastery/conky_photos/"
photo=/tmp/conkyPhoto.png
#choose your theme: 1,2 or 3
theme=1


I've got 4 photos to display being stored in home/mastery/conky_photos and I can't figure out what I'm doing wrong. I searched the Net, but not much info on this program. The thing that also confuses me is the "photo=/tmp/conkyPhoto.png" section above, since it's calling on a photo that I don't have any of my 4 named. I know I'm screwing something up, but my old mind can't figure out what I'm screwing up.

Anybody see something wrong with the above and can point me in the right direction? Thanks!
Last edited by mastery on Fri Nov 19, 2010 1:39 pm, edited 1 time in total.
mastery
Level 1
Level 1
 
Posts: 24
Joined: Fri Nov 05, 2010 10:39 am

Linux Mint is funded by ads and donations.
 

Re: Question about conky photo setup

Postby mastery on Wed Nov 17, 2010 4:14 pm

Anybody?
mastery
Level 1
Level 1
 
Posts: 24
Joined: Fri Nov 05, 2010 10:39 am

Re: Question about conky photo setup

Postby sgosnell on Wed Nov 17, 2010 4:26 pm

Did you compile conky with imlib2 support? From what little I've read, that's required, and you need ver 1.7.1 or later. Is imlib2 installed on your system?

Running 'conky --version' on my system shows that I have 1.8 installed, and that it has imlib2 support present. I have to confess that I've never tried to use the photo features, so I'm not likely to be much help. I see more stuff in the version output that interests me, though, such as METAR weather info. I'm going to have to look into these features.
Asus eee-pc 900 w/ 32GB SSD.
sgosnell
Level 5
Level 5
 
Posts: 686
Joined: Fri Sep 10, 2010 9:32 pm
Location: Baja Oklahoma

Re: Question about conky photo setup

Postby Missed on Thu Nov 18, 2010 1:49 am

mastery wrote:

I've got 4 photos to display being stored in home/mastery/conky_photos and I can't figure out what I'm doing wrong. I searched the Net, but not much info on this program. The thing that also confuses me is the "photo=/tmp/conkyPhoto.png" section above, since it's calling on a photo that I don't have any of my 4 named. I know I'm screwing something up, but my old mind can't figure out what I'm screwing up.

Anybody see something wrong with the above and can point me in the right direction? Thanks!



Reading (and then re-reading!) your post, I think you have already answered your own question.

Try renaming one of your photos to conkyPhoto.png, or put the name of one of your photos in that line.
Missed
Level 2
Level 2
 
Posts: 74
Joined: Thu Sep 06, 2007 4:46 am
Location: New Zealand

Re: Question about conky photo setup

Postby vrkalak on Thu Nov 18, 2010 1:57 am

Missed wrote:Try renaming one of your photos to conkyPhoto.png, or put the name of one of your photos in that line.


Agreed, you need to save the pic/image as a .photo.png file.

As such > ${image ~/.2164.png -p 65,270 -s 100x100}
Image
:: LinuxMint-Debian-Edition (Fluxbox) :: Manjaro/Arch (Xfce) ::
Registered Linux User: #497031 :: DeviantART Page
User avatar
vrkalak
Level 10
Level 10
 
Posts: 3340
Joined: Mon Jul 20, 2009 5:53 pm
Location: Santa Fe, NM, USA

Re: Question about conky photo setup

Postby mastery on Thu Nov 18, 2010 8:56 pm

vrkalak wrote:
Missed wrote:Try renaming one of your photos to conkyPhoto.png, or put the name of one of your photos in that line.


Agreed, you need to save the pic/image as a .photo.png file.

As such > ${image ~/.2164.png -p 65,270 -s 100x100}


Ok, this is where I'm confused. I'm wanting to use conkyPhotoRandom, which will display random photos of pictures in a directory. I can rename one of the photos, but what do I name all the other pictures in the same folder?

sgosnell - it shows Imlib2 under the General section when I run the the version of conky.
mastery
Level 1
Level 1
 
Posts: 24
Joined: Fri Nov 05, 2010 10:39 am

Re: Question about conky photo setup

Postby sgosnell on Thu Nov 18, 2010 9:08 pm

The photo capability should be there, then. About all I can suggest is to read the manual carefully. I've never tried to use any photo capabilities in conky.
Asus eee-pc 900 w/ 32GB SSD.
sgosnell
Level 5
Level 5
 
Posts: 686
Joined: Fri Sep 10, 2010 9:32 pm
Location: Baja Oklahoma

Re: Question about conky photo setup

Postby mastery on Thu Nov 18, 2010 9:11 pm

sgosnell wrote:The photo capability should be there, then. About all I can suggest is to read the manual carefully. I've never tried to use any photo capabilities in conky.


Just tested it, and was able to get one photo to display in conky when putting the name of the file specifically into the script. Now I just have to figure out how to get the "random" part to work.

Thanks for your help sgosnell, and you too vrkalak!
mastery
Level 1
Level 1
 
Posts: 24
Joined: Fri Nov 05, 2010 10:39 am

Re: Question about conky photo setup

Postby sgosnell on Thu Nov 18, 2010 9:54 pm

Not much help from me, I just don't have much experience with conky. I used to play with it a little when I was running Crunchbang, but I haven't fooled with it in a long time.
Asus eee-pc 900 w/ 32GB SSD.
sgosnell
Level 5
Level 5
 
Posts: 686
Joined: Fri Sep 10, 2010 9:32 pm
Location: Baja Oklahoma

Re: Question about conky photo setup

Postby Txnca on Thu Nov 18, 2010 10:00 pm

Not that I've used this feature in Conky either, but I'll bet almost anything that it is a wildcard that you put in there for the random file. something like *.png. That seems to be the way most of these scripts work that I've been looking at lately.
Asus P5E MB/Intel C2D E8400@3Ghz/6GB Corsair Dominator DRAM/nVidia 8800GT 512MB
8xHDD 3.82TB
LG 22x DVD Burner
Logitec 5.1 Speakers/High Def Sound
Antec Tower/480w PSU
Samsung 22" LCD Monitor
APC 1300-XS UPS
User avatar
Txnca
Level 3
Level 3
 
Posts: 186
Joined: Thu Mar 18, 2010 9:30 am
Location: Ontario Canada VIA Texas

Re: Question about conky photo setup

Postby mastery on Thu Nov 18, 2010 10:17 pm

Txnca wrote:Not that I've used this feature in Conky either, but I'll bet almost anything that it is a wildcard that you put in there for the random file. something like *.png. That seems to be the way most of these scripts work that I've been looking at lately.


I agree, it has to be some kind of wildcard to randomly go through all the PNG files in one folder. I tried *, but that didn't work. I'll take a look through the script that the .conkyrc pulls from and see if I can figure it out. Coding is my weakest computer knowledge ability, but I'll try :?

Edited to add: Looks like it's just pulling the one picture based off the IMAGE tag, and it's not running the program. Here's the code as it shows up in the conky if anybody can chime in:
Code: Select all
${execi 240 ~/.conkycolors/bin/conkyPhotoRandom}${image /home/mastery/Pictures/Conky/harley.png -s 220x150 -p 10,610}


So, apparently the program isn't configured right at all. So, back to square one. I had the image at /tmp/conkyPhoto.png as was originally listed in the code, but it didn't work at all. Guess I need a first-grade level of a walk through of getting this to work if anybody would be willing to walk me through the steps.
mastery
Level 1
Level 1
 
Posts: 24
Joined: Fri Nov 05, 2010 10:39 am

Re: Question about conky photo setup

Postby Txnca on Thu Nov 18, 2010 11:08 pm

Hey, I just found this which basically makes your picture truly random. I believe that is what the problem is. To make it truly random you have to call an outside script which this is. Here is what this person did to make it work. Here is link to this post on that other forum.

Code: Select all
i use a script to generate a random slideshow in my conky:

#! /bin/bash

line=$(($RANDOM%`ls /home/arp/images/conkypics | wc -l`))
line=$((line + 1))

ls /home/arp/conkypics | nl | while read a b
do
  [ "$a" = "$line" ] && { cp /home/arp/conkypics/"$b" /home/arp/.ckpict; }
done

exit 0

that i call in conky with

${execi 10 ~/scripts/conky-slideshow.sh}${image /home/arp/.ckpict -p 30,240}



You can change it to work with your directories and the way you want it to look, but this seems to be what you are looking for.
Asus P5E MB/Intel C2D E8400@3Ghz/6GB Corsair Dominator DRAM/nVidia 8800GT 512MB
8xHDD 3.82TB
LG 22x DVD Burner
Logitec 5.1 Speakers/High Def Sound
Antec Tower/480w PSU
Samsung 22" LCD Monitor
APC 1300-XS UPS
User avatar
Txnca
Level 3
Level 3
 
Posts: 186
Joined: Thu Mar 18, 2010 9:30 am
Location: Ontario Canada VIA Texas

Re: Question about conky photo setup

Postby mastery on Fri Nov 19, 2010 10:24 am

Txnca wrote:
You can change it to work with your directories and the way you want it to look, but this seems to be what you are looking for.


I used the simple script you linked me to, and as usual, I can't get it to work after spending a couple of hours trying things this morning. Any chance you can tell me what I'm doing wrong? Here's all the pertinent information on what I'm working with:

I have 3 png pictures located here to display: /home/mastery/Pictures/Conky

Script is located here: /home/mastery/scripts/conky_slideshow.sh

.conkyrc code line:
Code: Select all
${execi 10 ~/scripts/conky_slideshow.sh}${image /home/mastery/.ckpict -s 180x120 -p 0,0}


script code:
Code: Select all
#! /bin/bash

line=$(($RANDOM%`ls /home/mastery/Pictures/Conky | wc -l`))
line=$((line + 1))

ls /home/mastery/Pictures/Conky | nl | while read a b
do
  [ "$a" = "$line" ] && { cp /home/mastery/Pictures/Conky/"$b" /home/mastery/.ckpict; }
done

exit 0
mastery
Level 1
Level 1
 
Posts: 24
Joined: Fri Nov 05, 2010 10:39 am

Re: Question about conky photo setup

Postby Txnca on Fri Nov 19, 2010 12:40 pm

mastery wrote:I have 3 png pictures located here to display: /home/mastery/Pictures/Conky

Script is located here: /home/mastery/scripts/conky_slideshow.sh

.conkyrc code line:
Code: Select all
${execi 10 ~/scripts/conky_slideshow.sh}${image /home/mastery/.ckpict -s 180x120 -p 0,0}


script code:
Code: Select all
#! /bin/bash

line=$(($RANDOM%`ls /home/mastery/Pictures/Conky | wc -l`))
line=$((line + 1))

ls /home/mastery/Pictures/Conky | nl | while read a b
do
  [ "$a" = "$line" ] && { cp /home/mastery/Pictures/Conky/"$b" /home/mastery/.ckpict; }
done

exit 0


The first thing I see that should be different is the very start of the script. From what I have read and done myself, the first part of the script should look like this.

Code: Select all
#!/bin/bash


No space after the "sha-bang"(#!).

Also, did you make your script executable? If not open a terminal and type this; (Make sure you are in the directory where the script file is.)

Code: Select all
chmod +x conky_slideshow.sh


Otherwise everything looks good from here. It is a very elegant script. Wish I had thought of it myself!

Anyway, do those things, then run it again. Hopefully it will work then!

OH! One more thing. You have your execi running at a very fast pace at 10, you might want to change that back to the 240 you had it at before. Of course it may work just fine at that pace. You just have to test it and see how fast you want it to change for you. 10 might be perfect or somewhere between 10 and 240 will be.
Asus P5E MB/Intel C2D E8400@3Ghz/6GB Corsair Dominator DRAM/nVidia 8800GT 512MB
8xHDD 3.82TB
LG 22x DVD Burner
Logitec 5.1 Speakers/High Def Sound
Antec Tower/480w PSU
Samsung 22" LCD Monitor
APC 1300-XS UPS
User avatar
Txnca
Level 3
Level 3
 
Posts: 186
Joined: Thu Mar 18, 2010 9:30 am
Location: Ontario Canada VIA Texas

Re: Question about conky photo setup

Postby mastery on Fri Nov 19, 2010 1:38 pm

Txnca wrote:
Anyway, do those things, then run it again. Hopefully it will work then!


Txnca....IT WORKS! Good catch on the typo at the beginning of the script, I completely missed it. Made the change, and it works like a dream now. I messed with this script and the last one I tried for hours trying to get something to work. Now that it works, I'm going to see what I can do to customize it a little bit more :lol:

Anyways, THANK YOU FOR YOUR HELP WITH THIS. MUCH APPRECIATED!
mastery
Level 1
Level 1
 
Posts: 24
Joined: Fri Nov 05, 2010 10:39 am

Re: Question about conky photo setup

Postby Txnca on Fri Nov 19, 2010 3:45 pm

mastery wrote:
Txnca wrote:THANK YOU FOR YOUR HELP WITH THIS. MUCH APPRECIATED!


You are very welcome! And I am glad I could help!
Asus P5E MB/Intel C2D E8400@3Ghz/6GB Corsair Dominator DRAM/nVidia 8800GT 512MB
8xHDD 3.82TB
LG 22x DVD Burner
Logitec 5.1 Speakers/High Def Sound
Antec Tower/480w PSU
Samsung 22" LCD Monitor
APC 1300-XS UPS
User avatar
Txnca
Level 3
Level 3
 
Posts: 186
Joined: Thu Mar 18, 2010 9:30 am
Location: Ontario Canada VIA Texas

Linux Mint is funded by ads and donations.
 

Return to Compiz, Conky, Docks, & Widgets

Who is online

Users browsing this forum: No registered users and 2 guests