Using Omnifocus2 and Geektool

I am currently having trouble integrating my new omnifocus 2 set up and my pre-existing Geektool widgets. The main problem is not being able to find the database. Does anyone have any tips?

What do you mean by “not being able to find the database”? Is there a specific error message you’re seeing? (Bonus points for a screenshot.)

1 Like

I also have a GeekTool OF setup. The script is looking for the database at:


… and works perfect.

Here’s the script I am using – I got it from one of the other geektool links. Basically, I couldn’t find the path to my data.

#OFOC=$(osascript -e ‘tell application “Finder” to get id of application file id “OFOC”’)
OFOC=“com.omnigroup.OmniFocus” # For Appstore-purchased variant use (slower) line above instead
echo “TASKS:”
sqlite3 $HOME/Library/Caches/$OFOC/OmniFocusDatabase2 ’
FROM ((task t left join projectinfo pi on tt
left join task p on tt.task=p.persistentIdentifier)
left join context c on tt.context = c.persistentIdentifier
WHERE tt.dateCompleted is null
ORDER BY,’ | awk ’
BEGIN {FS="|"; prj=0; ctx=0;}
# Whenever the value of col. 1 changes,
# write it out as a PROJECT header,
if (prj!=$1) {prj=$1; if (length(prj) < 1) {print “\n(INBOX)”}
else {print “\n” toupper(prj)}};

 # and whenever the value of col. 2 changes,
 # write it out as a [CONTEXT] sub-header.
 if (ctx!=$2) {ctx=$2; if (length(ctx) > 0) {print "[" ctx "]"}};
 # Whenever col 3. contains sth other than the project name,
 # write it out as a • TASK.
 if (length($3) > 0 && $3!=$1) {print "• " $3}


Now, when I try using this, I get the old database, the way that it looked when I used Omnifocus one. No updates since about last night. So, it seems to me that this info is saving to a different directory that i can’t actually find.

Ok – cleaned out every other file ever and used you hack, and it worked! Thanks a billion!

Yes, OmniFocus 2 stores its database in a different location than OmniFocus 1, so you need that “hack” to look at the right database.

1 Like

Piece of cake now.


I’m new using the shell, is there a way just to get the script to display only whats in the inbox?