I took the basic pieces of the images from Wunderground and editted them to fit the cloud and my liking, placing them in equal sized image files with transparent backgrounds. Once you have the basic values for the various weather conditions, you’ll need to make image files for each of them. For the time being, I have decided to use the same image for partlycloudy and mostlycloudy for now. They use clear, partlycloudy, mostlycloudy, rain, snow. Wunderground’s simplest weather condition codes are found between the tags. I used this at the command line for a few different cities until I found the names for most of the possible weather conditions. Replace BDL in the URL with your airport code for weather in your area. The line below copies all information from the url given into an XML document for refernce by the rest of the script. This isn’t perfect, given that many people live over a hundred miles from their nearest airport, but when in or near a metro area, it works just fine. The first part of the bash script I wrote pulls current weather information based on airport codes. I decided to use Wunderground to gather weather information, so I needed to find out what they name their basic image files for weather conditions.įrom here on, you’ll want to take a look at the weatherGeeklet repository on my GitHub to find the two pieces of code I will reference. To know how many images and of what kinds of weather you’ll need, you need to decide where you’ll be taking your weather information from. Once you have the image to overlay on your desktop, you’ll need the images for weather conditions that will display between this image GeekTool and your actual wallpaper. You’ll notice in some places, like the lower left edge, I’ve done a lazy job selecting the edges of the cloud: these are places where the weather condition images would not be showing, and therefore the edge would blend in regardless of my cropping job. I copied the large triangular cloud into a separate image file using Photoshop, and placed this image file in an image GeekTool directly over the cloud in the desktop image. Original photo by Jeff Weston, who reports catching the shot as his plane landed at Laguardia. I decided to use the below photo of midtown Manhattan with Brooklyn and Queens in the foreground, as the singular cloud makes for creating an extra layer much easier (and yes, it was a real cloud). To start, you’ll need a desktop-sized image with a features you can easily crop out to overlay on your weather conditions images. I used two small scripts, one written in bash and the other a line in python, but you could easily write all of this in one script, splitting it up was just faster for me in the moment. To accomplish this, you’ll needed to use two GeekTools, one image and one shell. While displaying weather widgets with images is a common GeekTool, I have yet to see one integrated into a desktop image, so I decided to give it a try. I’ve played with GeekTool on and off over the years - sometimes using it for practical reasons, like an easily visible record of uptime on older machines, and sometimes for frivolous ones, like the GeekTool I’m going to share with you today. These widgets commonly display time, date, to do lists, weather information, and images. GeekTool is an application available for Mac OS that allows the user to create widgets embedded in their desktop.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |