Meetings, menu bars, and focus modes

We recently moved all our issue tracking at work from GitHub Issues to Linear for one of the products that I work on. While playing around with Linear, I stumbled upon their Reclaim.AI integration and immediately fell in love. I quickly set about connecting the two tools, tweaking my settings, and even opened some issues w/ the Support teams of both products. After about a week, I finally had everything up and running exactly how I wanted it. During our sprint planning meeting, I simply pulled whatever Linear issues I wanted to work on into the cycle, and then let Reclaim schedule my work based on priority and points. While I could probably write an entire blog post about these two apps, these tools are really just the ‘setting’ for this post. You see, now that I had all my work being scheduled for me by a AI, I found that I needed to have my calendar open at all times to see what I was supposed to be working on. I hate having apps open (or extra tabs in a browser) when I can have the info presented to me in some other fashion. Thankfully, I had previously discovered MeetingBar and was already a huge fan. So now I have MeetingBar running in my OSX menu bar showing me (via Reclaim) exactly what I’m supposed to be working on (or what I’m about to start working on). I was living the dream.

And then the latest release of MeetingBar dropped with AppleScript support. I had been looking for way to automatically enable ‘Do Not Disturb’ mode for the duration of a meeting for a while, but I had a couple of issues. Now that my entire day is a set of Reclaim “meetings” I obviously didn’t want DnD on the entire day (annoying as they may be, I do need to see my Slack notifications, lol). I really only wanted DnD mode active if the meeting in question had a URL defined. As a remote worker, my meetings are always an URL to the online meeting, so I dug into the AppleScript support and quickly realized that what I wanted was possible but more complicated than I really wanted to deal with. I scrolled around a bit more on the web looking at suggested solutions for automating DnD and eventually stumlbed upon macos-focus-mode. A quick brew install npm, followed by npm install macos-focus-mode and I was in business!

I added the macos-focus-mode shortcut as per the directions on their website, tested it out few times manually to ensure it did what I wanted, and finally I went into the MeetingBar settings screen and rigged everything up:

  1. In the Preferences, go to the Advanced tab
  2. Check the ‘Run AppleScript Automatically’ checkbox
  3. Pick ‘when the event starts’ from the drop-down
  4. click on ‘Edit script’

Your script should look like this:

on meetingStart(eventId, title, allday, startDate, endDate, eventLocation, repeatingEvent, attendeeCount, meetingUrl, meetingService, meetingNotes)
   if meetingUrl is not "EMPTY" then
    set _duration to -(startDate - endDate) / 60
     tell application "Shortcuts Events"
       run the shortcut named "macos-focus-mode" with input _duration
     end tell
  end if
end meetingStart

Click the ‘Save’ button, then ‘Save script’ button and you’re all set! Now when a meeting starts that has an URL associated with it, MeetingBar will call your saved script, which calls the macos-focus-mode shortcode which enables DnD for the duration of the meeting. It sounds like a bunch of indirection but it happens almost instantly. I couldn’t be happier with the setup.