1/27/2024 0 Comments Geektool weather 2015![]() The only time interval allowed is seconds, which makes for lots of math when you want to update something twice a day, once a week, once a month, etc. You can even specify any window as an "always on top" window, in which case it will float over all other OS X objects (including the dock).Įntering the update intervals is more difficult than it need be. ![]() Each of the types of GeekTool tasks has its own settings, along with universal options for update interval, window size, position, color, and (if applicable) text. You create new entries in groups, and then assign a task (display a file, output from a shell command, or show an image) to that entry. GeekTool's interface is a bit confusing and can be somewhat daunting to understand, but it gets easier the more you use it. And no, I don't normally devote this much screen space to GeekTool toys my usual set is just the uptime display, cal output, and (on interesting weather days) the weather map. The top left image is the Portland Doppler radar, which gets refreshed every 10 minutes, and to the right of that is an infrared image of the sun, updated every four hours. To the right of the calendar is a three-month Apple stock chart, updated every five minutes. The calendar output is only updated once per day. In the left corner is a calendar, courtesy of the cal command (as discussed in the linked hint above). At the very bottom of the screen, the output of the uptime command is displayed, and it updates automatically every 15 minutes. Now my Desktop looks like this.I've got five separate GeekTool tasks running in the above image. The change is the optional hyphen ( -?) before the digit. The temperature is always on theġ7: # second line, so exchange it with the last line.Ģ0: # Sometimes there's a windchill line, and sometimes there isn't.Ģ1: # Add a blank line to the front of the array if there isn't.Ģ4: # Print the lines of interest in the order I want.Ģ5: print join "", 7 has the new regular expression. This is what the noaanow script looks like now: 1: #!/usr/bin/perlģ: # Grab all the lines and put in an array.Ħ: # Keep only certain lines for the current conditions.ħ: = grep /^ +(Temperature -?\d|Wind|Relative)/, # Erase the leading spaces and parenthetical (metric) values.ġ5: # I want the temperature line to print on the bottom to make itġ6: # easy to see on the desktop. I couldn’t believe I hadn’t run into this bug earlier maybe I just wasn’t paying attention on below-zero days before today. So the regular expression didn’t collect the temperature line. The problem was that today’s temperature didn’t start with a digit( \d), it started with a minus sign (actually a hyphen). Many lines in the data start with the word “Temperature,” but only the line with the current temperature is immediately followed by a number, hence the Temperature \d portion of the regular expression. ![]() Ob KARR 181452Z 00000KT 4SM BR CLR M18/M18 A3034 RMK AO2 SLP291 T11781183 51011Īnd here’s the line in the Perl script that extracts the data I want = grep /^ +(Temperature \d|Wind|Relative)/, is the list of all the lines in the data. Pressure tendency 0.03 inches (1.1 hPa) higher than three hours ago Here’s chunk of the output that has the current conditions Conditions at In the Terminal, I saw what the problem was. I first thought that NOAA had changed the format of the data, which would screw up my extraction script, but after running /opt/local/bin/lynx -dump -width 100 This gets a big chunk of data from the local NOAA weather station and dumps it to a Perl script that extracts just the parts I want to display. Why was the temperature missing? The GeekTool shell command that controls the display is this command /opt/local/bin/lynx -dump -width 100 | /Users/drang/bin/noaanow Here’s what the lower left corner of my Desktop looked like. Today I noticed that my GeekTool weather information was goofed up. Next post Previous post GeekTool desktop weather fix
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |