Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

h-electron-window-state

harumando8MIT0.0.4

Fork of mawie81/electron-window-state

electron

readme

This repository is a fork of mawie81/electron-window-state It shares all the functionality the original repo has, but this version also can save window state to an already existing JSON file. To do that you need to pass object_path property to windowStateKeeper function

  let mainWindowState = windowStateKeeper({
    defaultWidth: 1000,
    defaultHeight: 800,
    object_path: 'settings.window.position',
    path: 'app-settings.json'
  });

So your app-settings.json file would look like this

  {
    ...
    ...
    settings: {
      window: {
        position: { Here will be the window state }
      }
    }
  }