Welcome to GeekTool Scripts
On this Page you can find a couple of my Desktop Scripts that can be used with GeekTool or NerdTool or Conky.
Essentially, these are small shell scripts that display bits of information: Current free HDD space, Temperature, Weather, etc.
The vast majority is text-only, but a couple of scripts can also save save image files that then can be displayed.
To use the scripts:
- Download the compressed file (or clone the repo)
- Change paths that are hard-coded in the files (needed for things like images)
- Change certain info contained in the file (eg. IP Addresses or URLs)
- Run the scripts. Their output will tell you what to do.
The Battery script
The battery.sh
script has a bunch of different options. Most notable are graphical
and info
. You can use the battery.png
image to give the graphical representation a nice border...
Your age in seconds
The script seconds_from_birth.sh
contains comments how you have to format your birthday for it to work correctly.
Here is an example output:
Analog ASCII Clock
The script clock_ascii.pl
takes a width and a height parameter and outputs a clock in ASCII Characters.
At first it looks really crude, but if you make play with width, height and font-size, it can look quite compelling.
Gmail Script
The gmail.sh
script uses OAUTH 2.0 to connect to google and all passwords are stored in the OS X Keychain. It has an init
parameter with which it has to be run once from the Terminal.
Afterwards it can be used in GeekTool with the getmail
parameter.
Calendar
The calendar.sh
has a multitude of options. Use -c
to have the current day colored, -m
to have the calendar start on mondays. If you want to influence the coloring and are not too comfortable with editing the script, use the xyz_gap
and xyz_date
options and create two scripts: one does show the current date, the other the rest of the calendar. This way, you can even use different fonts for the current date.
Fuzzy Time
The fuzzytime.php
script outputs the time in a more "spoken" way.
Clock Images
The clock_images.php
script can be run with different options do output a "station clock" like image that can include, seconds, minutes, hours and clock hands. Each Option creates it's own image.
It's worth looking into the source - there you can change the default colors (default is all white with the current hour blue). Lay multiple images over one another to have a nice GeekTool Clock or stack them inside one another (hours->minutes->seconds) to have a "ring" clock.
If you don't mind the CPU cycles, set the seconds
option as well as the output of the resulting image to refresh every second - this produces a "ticking" clock image.
Mac Temperatures
The temperatures.sh
Script uses the tempmonitor
binary from Temperature Monitor. To get and use it, follow the comment instructions inside the script.
In order to see any output in GeekTool, be sure to set the output encoding to ASCII.
HDD Space
The hddspace.sh
script can display the information either in one package, or separated by volumes and sizes. This allows for different colors.
Network Access
The network.sh
script can display, which services are currently connecting to the internet,
your IP Addresses in horizontal and vertical form and a list of nearby WLAN networks.
The Ribbon
The Ribbons are two images (one with an apple, one without) that can be placed "on top" of other windows and can look quite nice in the upper left corner.
How to set up your own Gmail API Application
If you do not trust the gmail.sh script provided, or if you are just curious and want to tinker around: here is how you can set up your own \"Application\" for the Google API.
- Got to the Google API Console
- Choose \"API Access\" in the left hand column and the hit the big blue button
- Enter \"Branding Information\". This consists of an Application Name and an optional image
- Create a client ID. Different set-ups are possible - for GeekTool purposes, choose \"Offline\"
- Now you are good to go! You should be presented with an overview page that includes your credentials: Client ID, Client Secret and a Redirect URI
- When a user now tries to use your application, the will have to open a webpage and will be presented with a dialog like the one below