Geektool Scripts

Run the script./SoftwareUpdateCheckinstall.sh; Installation is usually quite quick. If you don't have GeekTool installed, it will be fetched as well. To install it, double-click its.PrefPane. This git repository contains various files to be used with GeekTool or NerdTool or Conky. Essentially, they are small scripts that provide useful output of certain system information. E.g.: Hard Drive Space, Temperature, Battery Info, etc. The vast majority is text-oriented, but there are also quite a few, neat graphical implementations. 🔥 GeekTool Scripts 🔥 Welcome! Here is a collection of scripts that I use with GeekTool. Some need to be update to be less. Tied to my desktop. This script is for running AppleScripts from the shell. It expects the AppleScript to be in the same directory as it, and it takes the script as a command line parameter. Open GeekTool and click 'New Entry' (bottom left) and then select 'Shell' from the drop down like you said, and just paste the code. You can change the appearance from the Colors and Fonts tab. Install the script below in /scripts/shadow.sh (you can put it anywhere, just be sure to modify the upcoming instructions appropriately). Make the script executable: chmod a+x /scripts/shadow.sh; Set up a shell geeklet or nerdlet (GeekTool or NerdTool) to refresh every 60 seconds and run this command: /scripts/shadow.sh 2&1. Alternatively, you can run this with cron.

Geektool Scripts Tutorial


10.6: A script to display available Apple software updates | 6 comments | Create New Account
Click here to return to the '10.6: A script to display available Apple software updates' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: A script to display available Apple software updates

This would be great if it also checked versions of your installed apps in Applications & ~/Applications for newer versions.

10.6: A script to display available Apple software updates

While interesting, that's certainly a complicated process to check for software updates from the command line. Type this in the Terminal to check for updates:
softwareupdate -l
Type this to install the updates (this requires admin rights):
sudo softwareupdate -i -a
Obviously there's other options if you want to gain more control over which updates are installed but that's the basics. You can even run them on a remote machine if you ssh into it first.

10.6: A script to display available Apple software updates
Mac OS X Software Update Notifications for Non-Admin-Users:
http://blog.kaputtendorf.de/2009/02/22/updatecheck/
It works pretty well :)
10.6: A script to display available Apple software updates
Yup. As it is written and stored at that hallow place on the Internet:
Thou shalt study thy libraries and strive not to reinvent them without cause, that thy code may be short and readable and thy days pleasant and productive.
-- The Ten Commandments for C Programmers. By extension, applies to Unix utilities as well. That said, I didn't know about the command line utility either, and am glad about the comments here often bringing out such solutions.

Is it really a good idea not to run as admin? (OK, bad phrasing--it's never a bad idea. I really mean: is it a bad idea to run as admin?) Running as normal user instead of admin was certainly a good idea on pre-Vista versions of Windows--if you were an admin, you could do anything anywhere and nothing would even try to stop you (or an executable silently running as you).
However, on OS X and newer versions of Windows, you are prompted for your password (or, on Windows, at least just confirmation if you're already an admin) whenever you do anything that requires admin privileges--e.g., modifying anything in the file system besides your profile folder, changing system-wide settings (like power management or the computer's hostname), and the like. You're prompted even if your account currently is an administrator. Even from Terminal (in OS X) you have to sudo for certain commands (and in Windows you'll have to do the equivalent right-click-and-choose 'Run as Administrator,' even if you are one, when you start the command prompt, to give it that extra level of elevation).
I don't really see how it's different, other that running as a non-admin makes you think of the username, as well.

10.6: A script to display available Apple software updates
Scripts
Uh, what's wrong with running softwareupdate -l from the command line whenever you're curious?

Concepts

AppleScript has been introduced in GeekTool because some users wanted to extend possibilities in ways that could not be implemented directly into the software.That's why it is a very powerful tool that will let you go far beyond the standard features of GeekTool.

The structure of scriptability in GeekTool is quite simple. The application object is composed of geeklet objects and group objects.

Each geeklet object has a set of properties and attached groups.

Each group can be set visible or not, this has the same effect as enabling or disabling groups in the menu or in system preferences.

Example

An easy way to get a list of geeklet objects is to run this simple script in Script Editor :

This produces an output like this :

As you can see, geeklets are referenced by their ID. This ID is generated when you create the Geeklet from System Preferences, and is unique.

A convenient way to get the ID of a given geeklet is to open GeekTool Preferences, select a geeklet, and double click on the bottom of the inspector palette where the ID is displayed. This will copy the ID in the pasteboard.

You can also get a given geeklet by its name, as long as you did set one in the inspector, like this :

It should return an output similar to this one :

Now you know how to reference Geeklets, let's see what you can do with it.

Manipulating Geeklets

This shows how to hide or show individual geeklets :

The only way to get it back is to set the property back to true, or relaunch GeekTool.

This flag will totally ignore groups settings. It will show, or hide a geeklet without checking if the geeklet should be visible or invisible according to currently enabled groups.

Geeklets

Manipulating groups

Here is how you can show or hide groups.

Refreshing geeklets

Another useful feature is the refresh (or refresh all) command

This will refresh all geeklets eligible to a refresh action (not File, which are continuous)

tell application 'GeekTool Helper' to refresh all

This will refresh a specific geeklet

tell application 'GeekTool Helper' to refresh geeklet id 'CAD821B6-EBC9-42CF-ADDC-AB3A473D1D7B'

Geektool Weather Script

Note the short notation used here, without tell / end tell block, this is standard AppleScript shortcut.

A long form would be :

Geektool Scripts 2018

Getting GeekTool dictionary

There is a little trick to get the GeekTool dictionary in Script Editor because the actual scriptable application is hidden into the .prefPane bundle.

Geektool Scripts Deutsch

  • In Script Editor, open the Library from the Window menu (Or Shift-Command-L)
  • Go to /Applications directory in the Finder
  • Right click (or control click) on GeekTool, and choose 'Show Package Content'
  • Go into Contents/PlugIns/
  • Right click (or control click) on GeekTool.prefPane, and choose 'Show Package Content'
  • Go into Contents/Resources/
  • Drag and Drop 'GeekTool Helper' application to the Library window of Script Editor

A more complex example

Geektool Scripts Geeklets

This script displays a dialog where you can select one or multiple geeklet to refresh nowCourtesy of Philippe M.