This is part three of this blog post, if you haven't seen the first or second part, you can find them here: https://www.igorkromin.net/index.php/2015/04/06/raspberrypi-and-a-usb-monitor-combined-to-make-a-photo-frame-part-1/ and https://www.igorkromin.net/index.php/2015/04/07/raspberrypi-and-a-usb-monitor-combined-to-make-a-photo-frame-part-2/.
In the two previous parts I set up file sharing, the Xorg and window manager settings and the script to select a random photo. This part shows the full Conky setup required to get the display happening. As a reminder, this is a screenshot of what the Conky script aims to do:
I set up a script that would launch Conky for me. In addition this script turns off HDMI output on the Raspberry Pi because I'm using a USB monitor. Here it is:
Now to make Conky start automatically when the window manager is started, I added the following configuration to the lightdm config file:
Since I wanted to have the weather forecast displayed in the picture frame, I had to have a way of getting this information. I went for '1d' script from this post: Conky weather+moon scripts (Accuw/WUndergr/NWS/Lunaf.com). However, instead of having Conky execute the script itself, I put it into cron as well, like so (new weather details every 10 minutes):
I also copied the ConkyWeather.ttf font file to the ~/.fonts directory.
...and now for the actual Conky script itself...
The image cache is turned off which should automatically refresh the current photo as soon as it's selected by the select.sh script, I do add a 10s refresh just in case though. The weather is updated every 600 seconds inside the script.
I've not bothered with clipping the forecast text, so sometimes it goes off the scree, when the forecast is especially long. I didn't think this would be a huge problem.
This is pretty much it. There is one extra part to this post coming up soon, in that post I describe how I added Apache to the mix so that the photo frame can be viewed in any web browser and controlled too e.g. turning off the screen, forcing the next photo to show up, etc. Keep and eye out for that post in the next couple of days.
Part 4 is posted now, check it out here: https://www.igorkromin.net/index.php/2015/04/15/raspberrypi-and-a-usb-monitor-combined-to-make-a-photo-frame-part-4/.