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 an exact match on app and title in its memory: a document you snapped last week and open again, or a browser window you placed and then quit. If there is one and its display is attached, the window is moved there and the zone lights up for a moment. A window Lattika has never seen stays where the app puts it, unless Move new windows to their last zone (below) is on or a rule applies. 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. After a change of resolution the windows take the new size of their zones, as long as the display still uses the same layout. Afterwards a matching workspace may restore as well (chapter 8).

When you edit a layout. A window that is in a zone moves with it when you drag the zone's edges, type a size for it or change the gaps in the layout editor. Only windows still sitting in their zone follow. After a merge, a split, a deleted zone or a reset the zone numbers stand for other zones, so windows stay where they are. Move windows with their zones when a layout is edited in Settings › General › Window memory turns this off; it is on by default.

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. The first is on by default, the second is off.

  • 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 also sends a window Lattika has never seen, such

as a new Finder window or an untitled document, to the zone its app last used. It is off by default: new windows that pile up in one zone are easy to mistake for windows that never opened. Windows with an exact app-and-title match return to their zone either way, and rules still apply.

Settings › General with the Window memory sectionSettings › General with the Window memory section

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. Lattika only places windows it has seen before,

matched by app and title, unless Move new windows to their last zone is on. Otherwise the app is excluded, the window opened minimized, or the display it 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.