3

I have been writing a script to check the weather. The script is fine and is working great as a cronjob but, I am now trying to have the results from the script(todays weather forecast) displayed in conky.

I have a file 'weather-outside' that the python-weather script writes to then I add this to the conkyrc file:

${color grey}Weather:${scroll 16 $execi 3600 cat $/home/User/Desktop/misc./weather-outside | fold}

The execi command is suppose to run at interval set to 3600secs but, this is the error message when running conky after:

Conky: execi needs arguments
Conky: Error destroying thread
***** Imlib2 Developer Warning ***** :
    This program is calling the Imlib call:

    imlib_context_free();

    With the parameter:

    context

    being NULL. Please fix your program.

I have changed execi to exec but, then the actually line 'cat $home/User/Desktop/misc./weather-outside | fold' scrolls across conky not the text from that file?

tijko
  • 7,599
  • 11
  • 44
  • 64

1 Answers1

7

Do not use file to get the information to display in conky. I don't know how you do it in Python but when I wrote Java application to get twitter feed to be displayed in conky I directly printed it to the console and used execi. This is how I used it

${execi 600 java -cp /home/aman/java/classes MyApp}

Also your file path seems odd to me.

This way you can keep weather info updated without having to update the text file too.

xyres
  • 20,487
  • 3
  • 56
  • 85
Arjun Thakur
  • 345
  • 1
  • 5
  • 17
  • 1
    Thanks Aman for the advice! Not updating a separate file and printing the information into the console is what I wanted to do initially but, didn't know how. :D The final line `${color grey}Weather:${scroll 16 ${execi 600 /home/User/Desktop/misc././weather.py | fold}}`. I don't know if your `cp` was the `copy` command or what but, I didn't need to put it in. – tijko Aug 14 '12 at 19:48
  • 1
    @tijko cp here stands for classpath and is java specific. so no worry for you! – Arjun Thakur Aug 15 '12 at 02:55
  • hey :) thanks for getting back to me. I would have just kept thinking it probably meant `cp` as in the terminal command in linux. – tijko Aug 15 '12 at 02:57
  • have you checked http://www.crunchbanglinux.org/forums/topic/59/my-conky-config/page/65/ they have many rc files there. – Arjun Thakur Aug 15 '12 at 03:08
  • I haven't checked too much into crunchbanglinux but, it seems like its pretty hot right now. `${color grey}Weather:${scroll 20 20 %{execi 400 /home/User/Desktop/misc././weather.py | fold}}` is what I have right now its working pretty good. I will definitely check out crunchbanglinux too. Thanks again! – tijko Aug 15 '12 at 03:12