Lattika Download
Chapters
  1. Help index
  2. Getting started
  3. Snapping windows with the mouse
  4. Layouts
  5. The layout editor
  6. Keyboard shortcuts
  7. Window memory
  8. Rules for apps
  9. Workspaces
  10. The Shortcuts app and automation
  11. iCloud sync
  12. Trial, buying and licenses
  13. Troubleshooting
  14. Frequently asked questions

Chapter 6 of 13

Window memory

Lattika remembers which zone each window was in and puts it back when the window comes back. You do not have to turn this on; it is how the app works.

What is remembered

Every time a window is snapped, by a drag, a shortcut, a rule, a workspace or the Shortcuts app, Lattika records on which display, in which layout and in which zone or zones it landed. The entry is keyed by the app and the window's title. A second entry per app records the last zone any of that app's windows went to.

Windows without a title get only the app-level entry. Up to 400 titled windows are kept, and the oldest entries make room for new ones.

The memory is stored on this Mac in memory.json (chapter 12). It is not synced through iCloud.

Zone numbers are applied to the layout the display uses now. If you snapped a window into zone 2 of a three-column layout and later switch that display to a 2 × 2 grid, the window is restored into zone 2 of the grid.

When windows are put back

When a window appears. About half a second after an app opens a window, Lattika looks for a remembered zone: first an exact match on app and title, then the app's last zone. If there is one and its display is attached, the window is moved there. This covers new documents, new browser windows and an app you quit and relaunch. Rules (chapter 7) are checked first and win over memory.

When the displays change. When you plug a display in or out or change a resolution, Lattika waits a second and a half for things to settle, then puts every open window that has an exact app-and-title match back into its zone, provided the display it was on is attached again at the same size. Afterwards a matching workspace may restore as well (chapter 8).

When you ask. Restore Windows to Zones in the menu, ⌃⌥R, or the Shortcuts action puts back every open window that was snapped in this session or has an exact app-and-title match in the memory.

Restoring never touches windows of excluded apps, minimized windows, or windows that are not standard windows.

The two preferences

Both are in Settings › General › Window memory and both are on by default.

  • Restore windows to their zones when displays change controls the display-change restore. Turn it off if you prefer windows to stay where macOS puts them after you dock.
  • Move new windows to their last zone controls placement when a window appears. Turn it off if apps should open their windows wherever they like. Rules still apply.

If it does not work

  • A new window opens in the wrong place. Some apps set their own window size and position a moment after opening, overriding Lattika. Snap the window once more, or add a rule for the app. Chapter 12 has notes on Electron and Java apps.
  • A new window is not placed at all. The preference is off, the app is excluded, the window opened minimized, or the display the window was last on is not attached at the same size.
  • Restore Windows to Zones skips a window. Only windows snapped in this session or with an exact title match are restored. A window whose title changed since it was snapped, for example a document that was renamed, is not recognised. Snap it again.
  • Windows move after a display change although I did not snap them. They were snapped at some point and remembered. Turn off the display-change preference, or delete memory.json to start fresh (chapter 12).
  • Nothing is restored after the trial ended. Window memory needs a license, like every other feature that moves windows.