Focus Mode Persistence

As of June 2022, there’s no way to query the currently active Focus Mode.

A strategy to achieve similar functionality is to add Shortcut Automations for every Focus Mode such that:

  1. A file in iCloud contains the name of the currently active Focus Mode
  2. Whenever a Focus Mode mode is activated, its name is written to the file
  3. Whenever a Focus Mode mode is deactivated, a None is written to the file

Shortcuts

Set Focus Mode

400

Unset Focus Mode

400

Get Focus Mode

400

Write Variable Shortcut

400

Read Variable Shortcut

400