Window management and navigation in OmniFocus (with a little automation magic)

In the lead-up to my Learn OmniFocus workflow session, I wanted to share some of the nitty-gritty details of how I manage my tasks with OmniFocus. That session will focus on the magic of Omni Automation (✨!). So, over this week, I’m concentrating on the more foundational, structural side of things, like projects, tags, and perspectives.

At this point we’ve covered my main ‘dashboard view’, and a series of other custom perspectives. Managing this many perspective windows manually would be a recipe for madness. So, even though I’m focusing more on the structural setup with this short series, I think it’s time to introduce a few tiny sparks of automation magic to this setup.

Launching the Dashboard

Launching the dashboard ultimately looks like this:

This uses the combined powers of Keyboard Maestro and Alfred, although a keyboard shortcut or other macro trigger would likely work just as well.

1. Keyboard Maestro macro

I won’t reproduce the entire Keyboard Maestro macro here (for brevity) but if you’re interested you can download it to take a closer look. Broadly, it does the following:

  1. Closes any OmniFocus windows that are already open
  2. Re-opens OmniFocus
  3. Uses a menu item action to set the Focus mode. I have two simple Omni Automation actions set up that focus on either work or personal tasks, and they are named identically except for the ‘name’ of the focus, so I use a variable to run either ‘Focus on Personal’ or ‘Focus on B&C’, as applicable.
  4. Checks to see whether the sidebar, inspector, or toolbar are shown. If they are, it hides them.
  5. Creates a new window, navigates to the next custom perspective, and resizes the window.

The actions for the last step look something like the below. (Note that I have two slightly different versions of my dashboard (personal and work) and so, by using the %TriggerValue% variable in a couple of places, I get a little extra flexibility without having to create two separate macros.)

2. Custom workflow in Alfred

Alfred is my app launcher of choice and I’ve recently acquired the PowerPack. I regret not buying it sooner!

I’ve set up a custom workflow with two steps:

The first action is a list filter (shown below), which allows me to select either ‘Personal’ or ‘B&C’ to use as the trigger value for the Keyboard Maestro macro.

The second action is an AppleScript, which runs the Keyboard Maestro macro with the given trigger value:

Show In Project

From my dashboard view, I will sometimes see a task and want to view or edit its project. To help with this I’ve created a simple ‘Show In Project’ Plug-In and assigned this to a keyboard shortcut. This opens the selected task in the Projects view and focuses on that project. (I have it set to open in a new window, but that is optional.)

Maximise Window

When I do open a new window using the above action, Quick Open, or some other way, it is usually the same size as the window that created it: if I’m opening it from a custom perspective, it’s about a sixth of the screen. In addition, it doesn’t have a toolbar, inspector, or sidebar, which for planning and tweaking is not optimal!

To get around this, I have a custom ‘Maximise’ macro set up in Keyboard Maestro that simply resizes the window to take up the full screen and shows each of these items.

Below you can see these ‘Show in Project’ and ‘Maximise Window’ automations in action:

Open New OmniFocus Window

I also have a Keyboard Maestro macro that intercepts the ⌘ + N keyboard shortcut while OmniFocus is open. This would usually be used to add a new task, but I don’t tend to use it that way and so I instead use it to create a new OmniFocus window and run the ‘Maximise OmniFocus’ macro from above.

Consider this your regular reminder that small quality-of-life automations are sometimes the best automations!

Next up in this series: switching contexts in OmniFocus.

14 thoughts on “Window management and navigation in OmniFocus (with a little automation magic)”

  1. Hi Kaitlin, thanks for your inspiring work. You mentioned ‘I have two simple Omni Automation actions set up that focus on either work or personal tasks’. Could you please share how to set those up?

    1. Hi Koen, pleased to have inspired you! I’ve made a note of this and will hopefully share something on this for you soon.

      1. That very kind. I’ve found a script by Ian Young somewhere online which does the trick.

        “type”: “action”,
        “targets”: [“omnifocus”],
        “author”: “Ian Young”,
        “identifier”: “”,
        “version”: “1.0”,
        “description”: “Focus on home-related folders only.”,
        “label”: “Focus: Private”,
        “shortLabel”: “Focus: Private”
        var _ = function(){
        var action = new PlugIn.Action(function(selection, sender){

        // // Collect up an array of the things we want to set as our focus. // This can be any mixture of projects and folders. For the example, // we just include a couple of top-level folders. // var itemsToFocus = new Array() itemsToFocus.push(folderNamed('Private'))[0].focus = itemsToFocus


        action.validate = function(selection, sender){
        // This action is always valid.
        return true

        return action;

        It works. I created a similar script to focus on Work. I also created Alfred workflow like you to open your OmniFocus dashboard for focus on Private or Work. And it works fine. Except the final step in the script: opening the 6th window based on checking the TriggerValue. In my case if TriggerValue = Private do … if TriggerValue = Work do … If checked it a dozen times, and I can’t figure out why it isn’t working. Any help is appreciated! Sorry, for being such a newbie!

        1. Glad you’ve found a script to use! And don’t be sorry! In this case, I think the problem is actually me, not you. I made a tweak to the Keyboard Maestro macro prior to sharing it and now something is not working for the 6th window for me either. I’ve been meaning to take a look at it (I’m sure I’ve just done something silly) but I possibly won’t get to it for a few days. I will get in touch again when I’ve resolved the issue!

          1. I’m pretty sure that the fix for the Keyboard Maestro macro is this: the name of the last window needs to be changed from “Waiting” to “⏳ Waiting”.

          2. This should be fixed in the version linked now. Apologies for not circling back to this comment thread earlier! (My perspective name is actually just ‘Waiting’ but I updated the macro and it’s working in my testing.)

  2. You wrote: ‘To get around this, I have a custom ‘Maximise’ macro set up in Keyboard Maestro that simply resizes the window to take up the full screen and shows each of these items.’

    Could you please explain how it gets triggered?

      1. Ah, thanks… I don’t have BetterTouchTool. So if I understand correctly, there are three things you manually do in sequence, am I correct? You manually select a task from your dashboard, then manually trigger the ‘Show in Project’ plugin, and finally you trigger the Maximise macro. I would love to automatically maximise after I choose ‘Show in Project’. Is that possible somehow?

        1. Yes, that’s correct.

          That would be possible, definitely! What you could do would be to create a new Keyboard Maestro macro which
          a) triggers the ‘Show in Project’ plug-in (you could do this by getting Keyboard Maestro to select the menu item) then
          b) executes the ‘Maximise’ macro.

  3. For those who are trying to get the Alfred “Dashboard” workflow to work, one tweak that is not evident from the pictures should solve the problem. After setting it up according the the pictures above, click the “[x]” in the upper-right-hand corner of the workflow screen. Then add a Workflow Environment Variable with the name “TriggerValue” and the value “argv”.

    1. Interestingly, I don’t have it set up this way. I’m far from an Alfred expert, but I wonder whether what I have done by entering the name in the ‘Arg’ box on the right of the list filter screen achieves the same result?

Leave a Reply