1/13/2024 0 Comments Best geektool scriptsOnce a task has been created, you can move and size its window by either entering the data in the Location portion of the input screen, or by dragging and stretching its window with the mouse - just make sure you select the task in the Groups window first. A better solution would be a numeric entry box and a pop-up menu for choosing between seconds, minutes, hours, etc. 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. Else, make the group invisible if thePingResponse is not equal to ' then tell application 'GeekTool' set visible of group 'RO Pings' to true end tell else tell application 'GeekTool' set visible of group 'RO Pings' to false end tell end if end if # Wait 20 seconds before starting the idle loop again.I've got five separate GeekTool tasks running in the above image. set theStoredIPAddress to theIPAddress # If the response variable (thePingResponse) is NOT empty (ping succeded) # set the GeekTool group to visible. # Sets the gloabl vaiable to the current IP for future iterations. ![]() set thePingResponse to ' set thePingResponse to (do shell script 'ping -c 1 2>/tmp/errorfail.txt | grep '64 bytes from' exit 0') # display dialog thePingResponse with title 'Ping Response' - another debug line. ' exit 0' forces the script to # return 0. if theStoredIPAddress is not equal to theIPAddress then # Gets response of Ping shell script. # Compares current IP address to IP stored in gobal variable. set theIPAddress to (do shell script '/sbin/ifconfig en0 | grep 'inet ' | awk '') as string end if # display dialog 'IP Address: ' & theIPAddress & return & 'Stored Address: ' & theStoredIPAddress with title 'IP Address' -Line used to display current & stored IPs. RAW Paste Data Geektool Scripts Calendar # Define and initialize a global variable used to store the IP # address between iterations of the Idle Loop global theStoredIPAddress set theStoredIPAddress to ' as string # Begin the idle loop on idle # Runs a shell script that checks the IP address of en0 (Ethernet Adapter) # If en0 returns no IP, checks en1 (AirPort Adapter) # Stores the IP address to a variable as a string. Create a new shell Geeklet (window in GeekTool), providing the complete path and name for the script you want to run AND any arguments the script needs.Make the script(s) executable (instructions in main.bash). ![]() the rss reader script wants to know how many entries you want and what the url is). I recommend grabbing main.bash as this has syntax for running each script - some of these take arguments (ex.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |